Sha256: c7fb079309751c0af6b852ddd17b8f2e40d41c61cbbd79e50c9b0ed07edb2f91
Contents?: true
Size: 499 Bytes
Versions: 3
Compression:
Stored size: 499 Bytes
Contents
require "spec_helper" describe Mongoid::Matchers::In do let(:matcher) do described_class.new("first") end describe "#matches?" do context "when the values include the attribute" do it "returns true" do matcher.matches?("$in" => [/\Afir.*\z/, "second"]).should be_true end end context "when the values don't include the attribute" do it "returns false" do matcher.matches?("$in" => ["third"]).should be_false end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongoid-3.1.7 | spec/mongoid/matchers/in_spec.rb |
mongoid-3.1.6 | spec/mongoid/matchers/in_spec.rb |
mongoid-3.1.5 | spec/mongoid/matchers/in_spec.rb |