uuids 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,8 +17,19 @@ module Uuids
17
17
 
18
18
  describe "#value=" do
19
19
 
20
- it "is private" do
21
- expect { subject.value = SecureRandom.uuid }.to raise_error
20
+ let!(:subject) { build :uuid }
21
+ let!(:value) { SecureRandom.uuid }
22
+
23
+ it "sets #value before creation" do
24
+ subject.value = value
25
+ subject.save!
26
+ expect { subject.reload }.not_to change { subject.value }.from value
27
+ end
28
+
29
+ it "doesn't change #value after creation" do
30
+ subject.save!
31
+ expect { subject.update_attributes! value: value }
32
+ .not_to change { subject.reload }
22
33
  end
23
34
  end
24
35
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uuids
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kozin