Created
September 14, 2008 00:59
-
-
Save wycats/10680 to your computer and use it in GitHub Desktop.
This file contains 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
# 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