ddr-models 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ddr/models/base.rb +1 -1
- data/lib/ddr/models/version.rb +1 -1
- data/spec/support/shared_examples_for_ddr_models.rb +11 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da50135654363b20574569ef5967a18a471b0afa
|
4
|
+
data.tar.gz: 566f3c61641129334f3c6fae541c5741671e24be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c4b521425545c5858e7081067b8e74fc0c1cb35951b46be14e5e3bff18fde0c61718caa74be75491571eaed58810bebe085bd1feaaeb3262347862029d28700
|
7
|
+
data.tar.gz: 8afb94f2161f2f412d9bd4e52cc0d0e31a2fc9db343a1f79fa26fbfa8d436ae437e58d5c3587f194f382dda1229306536d29538fdcf13ff54bdf962f7e8a05ef
|
data/lib/ddr/models/base.rb
CHANGED
data/lib/ddr/models/version.rb
CHANGED
@@ -170,19 +170,27 @@ RSpec.shared_examples "a DDR model" do
|
|
170
170
|
describe "versioning" do
|
171
171
|
describe "on create" do
|
172
172
|
it "creates a version" do
|
173
|
+
# expect { subject.save(validate: false) }
|
174
|
+
# .to change(subject, :has_versions?).from(false).to(true)
|
173
175
|
expect { subject.save(validate: false) }
|
174
|
-
|
176
|
+
.to_not change(subject, :has_versions?)
|
175
177
|
end
|
176
178
|
end
|
177
179
|
describe "on update" do
|
178
180
|
before { subject.save(validate: false) }
|
179
181
|
it "creates a version" do
|
182
|
+
# expect {
|
183
|
+
# subject.dc_title = ["Changed Title"]
|
184
|
+
# subject.save(validate: false)
|
185
|
+
# }.to change {
|
186
|
+
# subject.versions.all.size
|
187
|
+
# }.by(1)
|
180
188
|
expect {
|
181
189
|
subject.dc_title = ["Changed Title"]
|
182
190
|
subject.save(validate: false)
|
183
|
-
}.
|
191
|
+
}.to_not change {
|
184
192
|
subject.versions.all.size
|
185
|
-
}
|
193
|
+
}
|
186
194
|
end
|
187
195
|
end
|
188
196
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddr-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Coble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-06-
|
12
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|