store-spec 0.0.2 → 0.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/store/spec/version.rb +1 -1
- data/lib/store/spec.rb +25 -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: 919d742800b71d4b6dd99598da471ae4ab5aad28
|
4
|
+
data.tar.gz: c581e75163b21d1049f839ff675b47504166da25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e95e66b0f0d99183499875897da6f01bc914c7a5df394028f7a5034c45c5c1d62d7494b725e85211262f40f2e0862c4665e24171c839a5ae5dc645bd2ecb7dec
|
7
|
+
data.tar.gz: 1612517a1278977f8a9d33cf913b502947da7d794cce2a9131895eb361c5eed4c3b11e1b47087bc18c2618344c770bf4693fdd4a236a8c05c9bc0e86317db642
|
data/lib/store/spec/version.rb
CHANGED
data/lib/store/spec.rb
CHANGED
@@ -102,7 +102,8 @@ class Store
|
|
102
102
|
let(:datas) do
|
103
103
|
[
|
104
104
|
data.merge('foo' => 'here'),
|
105
|
-
data.merge('foo' => 'there')
|
105
|
+
data.merge('foo' => 'there'),
|
106
|
+
data.merge('foo' => 'not_me')
|
106
107
|
]
|
107
108
|
end
|
108
109
|
|
@@ -110,9 +111,30 @@ class Store
|
|
110
111
|
ids = []
|
111
112
|
ids << subject.insert(datas[0])
|
112
113
|
ids << subject.insert(datas[1])
|
114
|
+
subject.insert(datas[2])
|
115
|
+
|
116
|
+
expected = [{"foo"=>"here", "uid"=>ids[0]}, {"foo"=>"there", "uid"=>ids[1]}]
|
117
|
+
|
118
|
+
assert_equal expected, subject.bulk_find(ids)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
describe 'all' do
|
123
|
+
let(:datas) do
|
124
|
+
[
|
125
|
+
data.merge('foo' => 'here'),
|
126
|
+
data.merge('foo' => 'there')
|
127
|
+
]
|
128
|
+
end
|
129
|
+
|
130
|
+
it 'returns all items' do
|
131
|
+
ids = []
|
132
|
+
ids << subject.insert(datas[0])
|
133
|
+
ids << subject.insert(datas[1])
|
134
|
+
|
135
|
+
expected = [{"foo"=>"here", "uid"=>ids[0]}, {"foo"=>"there", "uid"=>ids[1]}]
|
113
136
|
|
114
|
-
|
115
|
-
assert_equal datas, items.each {|item| item.tap {|i| i.delete('uid')}}
|
137
|
+
assert_equal expected, subject.all
|
116
138
|
end
|
117
139
|
end
|
118
140
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: store-spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Owiesniak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|