mm_uses_uuid 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,6 +18,10 @@ module BSON
18
18
 
19
19
  end
20
20
  end
21
+
22
+ def eql?(value)
23
+ self.to_s == value.to_s
24
+ end
21
25
 
22
26
  end
23
27
 
@@ -1,3 +1,3 @@
1
1
  module MmUsesUuid
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
@@ -56,6 +56,12 @@ describe MmUsesUuid do
56
56
  it "should have a useful inspect method that shows the uuid string" do
57
57
  @group._id.inspect.should == "<BSON::Binary:'#{@group._id.to_s}'>"
58
58
  end
59
+
60
+ it "should report that uuid BSON::Binary objects are eql? if they encode the same string" do
61
+ a = BSON::Binary.new("3333333333334333y333333333333333", BSON::Binary::SUBTYPE_UUID)
62
+ b = BSON::Binary.new("3333333333334333y333333333333333", BSON::Binary::SUBTYPE_UUID)
63
+ a.should eql b
64
+ end
59
65
 
60
66
  it "should cause associated objects to reference the parent uuid" do
61
67
  @group.people << @person
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jonathan Chambers
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-12-13 00:00:00 +00:00
17
+ date: 2011-12-23 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency