spec/lib/moneta/api/runtime_exception_spec.rb in moneta-api-1.8.0 vs spec/lib/moneta/api/runtime_exception_spec.rb in moneta-api-1.9.0

- old
+ new

@@ -1,10 +1,15 @@ describe Moneta::Api::RuntimeException do let(:message) { 'error' } let(:code) { 'SOAP-ENV:Client' } let(:detail) { { foo: ['bar'] } } - let(:exception) { described_class.new(code, message, detail) } + let(:exception) do + described_class.new(message).tap do |e| + e.code = code + e.detail = detail + end + end describe '.to_hash' do subject { exception.to_hash } its([:message]) { is_expected.to eq message }