Sha256: a431f721d3cfc07a072eb2373ce035fcd959a204096de268da07fa3853d6a480

Contents?: true

Size: 373 Bytes

Versions: 73

Compression:

Stored size: 373 Bytes

Contents

require "spec_helper"

describe Mongoid::Errors::InvalidSetPolymorphicRelation do

  describe "#message" do

    let(:error) do
      described_class.new(:postable, Post, Person)
    end

    it "contains the problem in the message" do
      expect(error.message).to include(
        "The postable attribute can't be set to an instance of Person"
      )
    end
  end
end

Version data entries

73 entries across 68 versions & 6 rubygems

Version Path
mongoid-7.0.13 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.12 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-6.4.8 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.11 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.10 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-6.4.7 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-6.4.5 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.8 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.7 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.6 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-5.4.1 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.5 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.4 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-6.4.4 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.3 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-6.4.2 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.2 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-7.0.1 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-6.4.1 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb
mongoid-5.4.0 spec/mongoid/errors/invalid_set_polymorphic_relation_spec.rb