Sha256: dc2480d549b4251ce4eff4196605400e9dc974ea86a1614aae764f42eb94ec08

Contents?: true

Size: 456 Bytes

Versions: 2

Compression:

Stored size: 456 Bytes

Contents

require "spec_helper"

describe Mongoid::Matchers::Ne do

  let(:matcher) do
    described_class.new("first")
  end

  describe "#matches?" do

    context "when the values are not equal" do

      it "returns true" do
        matcher.matches?("$ne" => "second").should be_true
      end
    end

    context "when the values are equal" do

      it "returns false" do
        matcher.matches?("$ne" => "first").should be_false
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mongoid-3.1.6 spec/mongoid/matchers/ne_spec.rb
mongoid-3.1.5 spec/mongoid/matchers/ne_spec.rb