Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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