spec/mongoid/matchable_spec.rb in mongoid-7.1.1 vs spec/mongoid/matchable_spec.rb in mongoid-7.1.2
- old
+ new
@@ -294,21 +294,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