Skip to content

Commit

Permalink
Specs for #=== comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
sporkmonger authored and durran committed Oct 6, 2012
1 parent afd8057 commit f5f7ddd
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/moped/bson/object_id_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,22 @@

end

describe "#===" do

context "when data is identical" do
it "returns true" do
Moped::BSON::ObjectId.from_string("4e4d66343b39b68407000001").should === "4e4d66343b39b68407000001"
end
end

context "when other is not an object id" do
it "returns false" do
Moped::BSON::ObjectId.new.should_not === nil
end
end

end

describe "#eql?" do

context "when data is identical" do
Expand Down

0 comments on commit f5f7ddd

Please sign in to comment.