spec/rack/oauth2/server/resource/mac/error_spec.rb in rack-oauth2-0.14.6 vs spec/rack/oauth2/server/resource/mac/error_spec.rb in rack-oauth2-0.14.7
- old
+ new
@@ -25,11 +25,11 @@
let(:env) { Rack::MockRequest.env_for("/authorize?client_id=client_id") }
let(:request) { Rack::OAuth2::Server::Resource::MAC::Request.new env }
describe 'unauthorized!' do
it do
- expect { request.unauthorized! :invalid_client }.should raise_error unauthorized
+ expect { request.unauthorized! :invalid_client }.to raise_error unauthorized
end
end
Rack::OAuth2::Server::Resource::Bearer::ErrorMethods::DEFAULT_DESCRIPTION.keys.each do |error_code|
method = "#{error_code}!"
@@ -39,10 +39,10 @@
when :insufficient_scope
# ignore
else
describe method do
it "should raise Rack::OAuth2::Server::Resource::Bearer::Unauthorized with error = :#{error_code}" do
- expect { request.send method }.should raise_error(unauthorized) { |error|
+ expect { request.send method }.to raise_error(unauthorized) { |error|
error.error.should == error_code
error.description.should == default_description[error_code]
}
end
end
\ No newline at end of file