Sha256: 019dc3fca18cc999c46af41f7ab7c6ee4779835afc294a96e96e3f7abc68aca2

Contents?: true

Size: 439 Bytes

Versions: 1

Compression:

Stored size: 439 Bytes

Contents

describe Moneta::Api::HTTPException do
  let(:message) { 'Server Error' }
  let(:code) { '500' }

  let(:exception) { described_class.new(code, message) }

  describe '.to_hash' do
    subject { exception.to_hash }

    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' }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
moneta-api-1.8.0 spec/lib/moneta/api/http_exception_spec.rb