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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b4105ee7a17132ecc30b165c5e4d281e3f8d8eac
4
- data.tar.gz: c525bd54c3c3a57ac2b861bea00d25dc3a7d8540
3
+ metadata.gz: 919d742800b71d4b6dd99598da471ae4ab5aad28
4
+ data.tar.gz: c581e75163b21d1049f839ff675b47504166da25
5
5
  SHA512:
6
- metadata.gz: 5cace10ae78221b6cd8eca752de0a28d68ae8216c751d1c290142838e18725319a62b1ea866f72e41fed916805dd8ed23abe9849769462c1498c492903ed6711
7
- data.tar.gz: dbbd259feac8c74fedb5f28e0fa1db2f189a3ca94f5cd3adfcde6e4d84a6c1ce95313a90bd286dcc2de76f27dad1c7e6a47ec8bed807d3613a3105c65730e7f2
6
+ metadata.gz: e95e66b0f0d99183499875897da6f01bc914c7a5df394028f7a5034c45c5c1d62d7494b725e85211262f40f2e0862c4665e24171c839a5ae5dc645bd2ecb7dec
7
+ data.tar.gz: 1612517a1278977f8a9d33cf913b502947da7d794cce2a9131895eb361c5eed4c3b11e1b47087bc18c2618344c770bf4693fdd4a236a8c05c9bc0e86317db642
@@ -1,5 +1,5 @@
1
1
  class Store
2
2
  module Spec
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
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
- items = subject.bulk_find(ids)
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.2
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-04 00:00:00.000000000 Z
11
+ date: 2013-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler