Sha256: 42d3ec30dbda4f36c456f1b58c2b60848d2dc9dd963074403cc76fcd9ad9592a

Contents?: true

Size: 513 Bytes

Versions: 2

Compression:

Stored size: 513 Bytes

Contents

require "spec_helper"

describe "Errors" do
  include_context "ReadOnlyModel"

  describe Findable::FindableError do
    it { is_expected.to be_kind_of(StandardError) }
  end

  describe Findable::RecordNotFound do
    let(:error) { Findable::RecordNotFound.new(read_model, {id: 1}) }
    it { expect(error).to be_kind_of(Findable::FindableError) }
    it { expect(error.message).to match(Regexp.new(read_model.model_name.name)) }
    it { expect(error.message).to match(Regexp.new({id: 1}.inspect)) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
findable-0.1.3 spec/findable/errors_spec.rb
findable-0.1.2 spec/findable/errors_spec.rb