Skip to content

Instantly share code, notes, and snippets.

@olkeene
Created April 2, 2009 08:52
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 olkeene/89104 to your computer and use it in GitHub Desktop.
Save olkeene/89104 to your computer and use it in GitHub Desktop.
describe FooController do
describe "route generation" do
it "should map { :controller => 'foo', :action => 'index' } to /foo" do
route_for(:controller => "foo", :action => "index").should == "/foo"
end
end
describe "route recognition" do
it "should generate params { :controller => 'foo', action => 'index' } from GET /foo" do
params_from(:get, "/foo").should == {:controller => "foo", :action => "index"}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment