Sha256: 39e37ee867c4b102fe7de4cd24a1bfb220385d29acf92d1d1fa3459967c80080

Contents?: true

Size: 512 Bytes

Versions: 5

Compression:

Stored size: 512 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

5 entries across 5 versions & 1 rubygems

Version Path
findable-0.2.2 spec/findable/errors_spec.rb
findable-0.2.1 spec/findable/errors_spec.rb
findable-0.2.0 spec/findable/errors_spec.rb
findable-0.1.5 spec/findable/errors_spec.rb
findable-0.1.4 spec/findable/errors_spec.rb