spec/lib/moneta/api/http_exception_spec.rb in moneta-api-1.8.0 vs spec/lib/moneta/api/http_exception_spec.rb in moneta-api-1.9.0
- old
+ new
@@ -1,9 +1,9 @@
describe Moneta::Api::HTTPException do
let(:message) { 'Server Error' }
let(:code) { '500' }
- let(:exception) { described_class.new(code, message) }
+ let(:exception) { described_class.new(message).tap { |e| e.code = code } }
describe '.to_hash' do
subject { exception.to_hash }
its([:message]) { is_expected.to eq message }