Sha256: a85f46ad06a0aaa1938e349ae203b2a8afd4d3241388120c29a6b08a18fd3633

Contents?: true

Size: 454 Bytes

Versions: 8

Compression:

Stored size: 454 Bytes

Contents

require "spec_helper"

describe Emites::Exception do

  class DummyError < Emites::Exception; end

  subject do
    DummyError.new(
      body:     "FAKE BODY",
      message:  "FAKE MESSAGE",
      code:     42
    )
  end

  it "responds to the correct accessors" do
    expect(subject.body).to eq("FAKE BODY")
    expect(subject.message).to eq("FAKE MESSAGE")
    expect(subject.code).to eq(42)
    expect(subject.to_s).to eq("FAKE MESSAGE")
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
emites-client-0.1.4 spec/emites/exception_spec.rb
emites-client-0.1.3 spec/emites/exception_spec.rb
emites-client-0.1.2 spec/emites/exception_spec.rb
emites-client-0.1.1 spec/emites/exception_spec.rb
emites-client-0.1.0 spec/emites/exception_spec.rb
emites-client-0.0.4 spec/emites/exception_spec.rb
emites-client-0.0.3 spec/emites/exception_spec.rb
emites-client-0.0.2 spec/emites/exception_spec.rb