Skip to content

Instantly share code, notes, and snippets.

@wycats
Created September 14, 2008 00:59
Show Gist options
  • Save wycats/10680 to your computer and use it in GitHub Desktop.
Save wycats/10680 to your computer and use it in GitHub Desktop.
# Iteration 1
class Foo < Application
def awesome
"Awesome"
end
end
match("/foo/awesome").to(:controller => Foo, :action => :awesome).name(:awesome)
#spec
it("returns awesome") do
request_route(:awesome).should have_body("Awesome")
end
# Iteration 2
class Bar < Application
def zoo
"Awesome"
end
end
match("/foo/awesome").to(:controller => Bar, :action => :zoo).name(:awesome)
# no change in spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment