Sha256: 86d396ed1a4b5e087710ea4e7a04f384eac6d8e0dd06a7f7ee275cc2398ed1c1

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

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) }

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

    its([:message]) { is_expected.to eq message }
    its([:code]) { is_expected.to eq code }
    its([:detail]) { is_expected.to eq detail }
  end

  describe '.inspect' do
    subject { exception }

    its(:inspect) { is_expected.to eq "SOAP-ENV:Client: error#{ $/ }foo: bar" }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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