uuids 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +41 -16
- data/Rakefile +2 -1
- data/app/models/uuids/uuid.rb +1 -3
- data/lib/tasks/uuids_tasks.rake +14 -7
- data/lib/uuids/version.rb +4 -2
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +1752 -0
- data/spec/models/uuids/uuid_spec.rb +13 -2
- metadata +1 -1
@@ -17,8 +17,19 @@ module Uuids
|
|
17
17
|
|
18
18
|
describe "#value=" do
|
19
19
|
|
20
|
-
|
21
|
-
|
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
|
|