Skip to content

Instantly share code, notes, and snippets.

@trevmex
Created July 6, 2010 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevmex/466064 to your computer and use it in GitHub Desktop.
Save trevmex/466064 to your computer and use it in GitHub Desktop.
describe "routing" do
it "recognizes and generates #index" do
get("/days").should have_routing('days#index')
end
it "generates #index" do
get("/days").should generate('days#index')
end
it "recognizes #index" do
('days#index').should recognize get("/days")
end
describe "nested in students" do
it "recognizes #index" do
('days#index').with(:student_id => "1").should recognize get("/students/1/days")
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment