spec/grape/middleware/auth/strategies_spec.rb in grape-0.11.0 vs spec/grape/middleware/auth/strategies_spec.rb in grape-0.12.0
- old
+ new
@@ -7,15 +7,15 @@
def app
proc = ->(u, p) { u && p && u == p }
Rack::Builder.new do |b|
b.use Grape::Middleware::Error
b.use(Grape::Middleware::Auth::Base, type: :http_basic, proc: proc)
- b.run lambda { |env| [200, {}, ['Hello there.']] }
+ b.run ->(_env) { [200, {}, ['Hello there.']] }
end
end
it 'throws a 401 if no auth is given' do
- @proc = lambda { false }
+ @proc = -> { false }
get '/whatever'
expect(last_response.status).to eq(401)
end
it 'authenticates if given valid creds' do