Created
November 7, 2012 08:09
-
-
Save xirukitepe/4030132 to your computer and use it in GitHub Desktop.
Sample rspec test for routes
This file contains hidden or 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
describe "routing to profiles" do | |
it "routes /profile/:username to profile#show for username" do | |
{ :get => "/profiles/jsmith" }.should route_to( | |
:controller => "profiles", | |
:action => "show", | |
:username => "jsmith" | |
) | |
end | |
it "does not expose a list of profiles" do | |
{ :get => "/profiles" }.should_not be_routable | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment