pipeline_dealers 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md
CHANGED
@@ -20,10 +20,9 @@ module PipelineDealers
|
|
20
20
|
def save(collection, model)
|
21
21
|
super
|
22
22
|
|
23
|
-
@items[model.class] ||= []
|
24
|
-
@items[model.class] << model
|
25
|
-
|
26
23
|
if model.id.nil?
|
24
|
+
@items[model.class] ||= []
|
25
|
+
@items[model.class] << model
|
27
26
|
model.send(:instance_variable_set, :@id, @last_id += 1)
|
28
27
|
end
|
29
28
|
end
|
@@ -21,8 +21,13 @@ module PipelineDealers
|
|
21
21
|
it "stores the model data" do
|
22
22
|
expect { model.save }.to change(model, :id).from(nil).to(Integer)
|
23
23
|
end
|
24
|
+
|
25
|
+
it "saving twice results in one item in the collection" do
|
26
|
+
expect { 2.times { model.save } }.to change(client.companies, :count).by(1)
|
27
|
+
end
|
24
28
|
end
|
25
29
|
|
30
|
+
|
26
31
|
let(:other_client) { TestClient.new }
|
27
32
|
|
28
33
|
it "is accessable from all instances" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pipeline_dealers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|