spec/mongoid/matchable_spec.rb in mongoid-7.0.7 vs spec/mongoid/matchable_spec.rb in mongoid-7.0.8

- old
+ new

@@ -291,21 +291,21 @@ end context 'when a BSON::Regexp::Raw object is used' do let(:selector) do - { street: BSON::Regexp::Raw.new("^Clarkenwell") } + { street: BSON::Regexp::Raw.new("\\AClarkenwell") } end it "returns true" do expect(document._matches?(selector)).to be true end end context 'when a native Regexp object is used' do let(:selector) do - { street: /^Clarkenwell/ } + { street: /\AClarkenwell/ } end it "returns true" do expect(document._matches?(selector)).to be true end