collector 0.0.12 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/collector/repository.rb +3 -1
- data/lib/collector/version.rb +1 -1
- data/test/collector/repository_spec.rb +8 -5
- metadata +2 -2
data/lib/collector/repository.rb
CHANGED
data/lib/collector/version.rb
CHANGED
@@ -97,11 +97,14 @@ describe Collector::Repository do
|
|
97
97
|
end
|
98
98
|
|
99
99
|
describe "find_by_id" do
|
100
|
-
it "returns
|
101
|
-
id
|
102
|
-
|
103
|
-
|
104
|
-
|
100
|
+
it "returns documents by their ID" do
|
101
|
+
id = "bson-id"
|
102
|
+
document_1 = stub
|
103
|
+
document_2 = stub
|
104
|
+
documents = [document_1, document_2]
|
105
|
+
TestRepository.expects(:deserialize!).with(document_1)
|
106
|
+
TestRepository.expects(:deserialize!).with(document_2)
|
107
|
+
collection = mock { expects(:find).with(_id: id).returns(documents) }
|
105
108
|
TestRepository.expects(:collection).returns(collection)
|
106
109
|
TestRepository.find_by_id(id)
|
107
110
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
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: 2012-12-
|
12
|
+
date: 2012-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|