spec.rb in rack-cerberus-0.1.4 vs spec.rb in rack-cerberus-0.1.5
- old
+ new
@@ -14,10 +14,10 @@
cookie = ''
should 'Raise if there is no session' do
no_session_app = Cerberus.new(secret_app, {}) {|login,pass| [login,pass]==['mario','bros']}
no_session_req = Rack::MockRequest.new(no_session_app)
- lambda { no_session_req.get('/') }.should.raise(RuntimeError).message.should=='Cerberus cannot work without Session'
+ lambda { no_session_req.get('/') }.should.raise(Cerberus::NoSessionError).message.should=='Cerberus cannot work without Session'
end
should 'Stop request if you are not already logged in or currently successfully logging' do
res = req.get('/')
res.status.should==401
\ No newline at end of file