Sha256: 59f726c0a3cdec3819c65465b3bd41ef017272aa211ee66ff4eb65e2ab21db06

Contents?: true

Size: 616 Bytes

Versions: 17

Compression:

Stored size: 616 Bytes

Contents

describe Moneta::Api::RuntimeException do
  let(:message) { 'error' }
  let(:code) { 'SOAP-ENV:Client' }
  let(:detail) { { foo: ['bar'] } }

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

17 entries across 17 versions & 1 rubygems

Version Path
moneta-api-2.1.0 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-2.0.0 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-2.0.0.rc2 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-2.0.0.rc1 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.13.0 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.8 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.7 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.6 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.5 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.4 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.3 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.2 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.1 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.12.0 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.11.0 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.10.0 spec/lib/moneta/api/runtime_exception_spec.rb
moneta-api-1.9.0 spec/lib/moneta/api/runtime_exception_spec.rb