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