Created
October 7, 2009 17:14
-
-
Save strass/204225 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
#routes | |
map.root :controller => "games", :action => "index" | |
# games_routing_spec | |
it "recognizes and generates root as #index" do | |
{ :get => "/" }.should route_to(:controller => "games", :action => "index") | |
end | |
# output | |
spec spec/routing/games_routing_spec.rb --color -f s | |
GamesController routing | |
- recognizes and generates root as #index (FAILED - 1) | |
- recognizes and generates #index | |
- recognizes and generates #new | |
- recognizes and generates #show | |
- recognizes and generates #edit | |
- recognizes and generates #create | |
- recognizes and generates #update | |
- recognizes and generates #destroy | |
1) | |
Test::Unit::AssertionFailedError in 'GamesController routing recognizes and generates root as #index' | |
The generated path <"/games"> did not match <"/"> | |
If you're expecting this failure, we suggest { :get => "/" }.should_not be_routable | |
./spec/routing/games_routing_spec.rb:7: | |
Finished in 0.155328 seconds | |
8 examples, 1 failure |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment