Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@trevmex
Created July 8, 2010 02:10
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 trevmex/467563 to your computer and use it in GitHub Desktop.
Save trevmex/467563 to your computer and use it in GitHub Desktop.
describe 'routing another way' do
it { should have_resources(:days) }
it { should get('/days' => 'days#index') }
it { should match('/days' => 'days#index', :via => :get) }
it { should recognize('/days', :via => :get).as('days#index') }
it { should generate('days#index').from('/days', :via => :get) }
it { should recognize('/students/1/days', :via => :get).as('days#index', :student_id => '1') }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment