Created
December 6, 2013 16:23
-
-
Save jherdman/7827578 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
shared_example 'accessing as an unauthorized user' do |request_proc| | |
it 'rejects their request' do | |
instance_exec(&request_proc) | |
expect(response.status).to eq(401) | |
end | |
end | |
describe 'GET #index' do | |
include_example 'access as an unauthorized user', -> { get :index } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment