Created
November 27, 2013 03:29
-
-
Save jasonngpt/7670267 to your computer and use it in GitHub Desktop.
Sinatra RSpec Testing for Redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "Homepage should redirect to locations#index" do | |
get "/" | |
last_response.should be_redirect # This works, but I want it to be more specific | |
follow_redirect! | |
last_request.url.should == 'http://example.org/locations' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment