Skip to content

Instantly share code, notes, and snippets.

@bkaney
Created January 12, 2009 23:20
Show Gist options
  • Save bkaney/46231 to your computer and use it in GitHub Desktop.
Save bkaney/46231 to your computer and use it in GitHub Desktop.
describe BooksController do
describe "route recognition" do
it "should generate params from POST /books" do
params_from(:post, '/books').should == {:controller => 'books', :action => 'create'}
end
# ...other routes here
end
describe "route generation" do
it "should route books's 'index' action correctly" do
route_for(:controller => 'books', :action => 'index').should == "/books"
end
# ...other routes here
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment