An RJS Redirect Matcher for rspec
January 29th, 2009You know what’s stupid? Clumsily checking for a javascript redirect in your RJS with this kind of shit:
it "should redirect to the collaborative quote screen" do
xhr :post, ‘attach’, :attachment_id => ‘4023′
response.body.should =~ /window\.location\.href = \"/collabquote\";"
end
Not only is this ugly, but it ties your test to a particular route, rather than [...]
