153 describe 'GET search/almonds' do
154 it 'should map /foods/search/almonds to {:controller => :foods, :action => :search, :name => "almonds"}' do
155 {:get => '/foods/search/almonds'}.should route_to(:controller => 'foods', :action => 'search', :name => 'almonds')
156 end
157 end
158
159 describe 'GET almonds' do
160 it 'should map /almonds to {:controller => :foods, :action => :search, :name => "almonds"}' do
161 {:get => '/almonds'}.should route_to(:controller => 'foods', :action => 'search', :name => 'almonds')
162 end
163 end
[nick@tuatara ~/src/isitpaleo] spec spec/controllers/foods_controller_spec.rb
..................F
1)
Test::Unit::AssertionFailedError in 'FoodsController GET almonds should map /almonds to {:controller => :foods, :action => :search, :name => "almonds"}'
The generated path <"/foods/search/almonds"> did not match <"/almonds">
If you're expecting this failure, we suggest { :get => "/almonds" }.should_not be_routable
./spec/controllers/foods_controller_spec.rb:161:
Finished in 0.117746 seconds
19 examples, 1 failure
[nick@tuatara ~/src/isitpaleo]