embark-journey 0.0.29 → 0.1.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b89e8bfb66ca4c4f356545376aef856f05f56b6
|
4
|
+
data.tar.gz: c06e140222c70b4b2565f754c8ec18e737cfe1d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b30f45baab6f77c47c0acb08796d4dc38758db834b43beb159cc4bffdb768723d81bf54b62fa34157e5bd6fe33e83b7197c047a7a6ff21a6c1e407db78f9db86
|
7
|
+
data.tar.gz: fbcf3ed97258b645618e9d8723d4cd34215ccb7827f4544a4ecf02de07b9cb64205b13b7b222b0a36b60842c6ec91f30828e5636059bb286b83e310f2f4f364a
|
data/lib/journey/version.rb
CHANGED
@@ -15,7 +15,7 @@ describe Journey::Resource::WhereMultiple do
|
|
15
15
|
|
16
16
|
before { klass.destroy_all }
|
17
17
|
|
18
|
-
let(:candidates) { matchables + unmatchables }
|
18
|
+
let!(:candidates) { matchables + unmatchables }
|
19
19
|
|
20
20
|
context "when query doesn't contain any key having an array-like value" do
|
21
21
|
let(:matchables) do
|
@@ -25,7 +25,7 @@ describe Journey::Resource::WhereMultiple do
|
|
25
25
|
[ klass.create(number: 'X') ]
|
26
26
|
end
|
27
27
|
|
28
|
-
let(:collection) { klass.where_multiple(query: { number: 'A' }) }
|
28
|
+
let!(:collection) { klass.where_multiple(query: { number: 'A' }) }
|
29
29
|
|
30
30
|
it 'returns correct results' do
|
31
31
|
expect(matchables).to be_all do |matchable|
|
@@ -39,6 +39,35 @@ describe Journey::Resource::WhereMultiple do
|
|
39
39
|
pending 'performs 1 query'
|
40
40
|
end
|
41
41
|
|
42
|
+
context "when query contains a key with the value of an array containing a single item" do
|
43
|
+
|
44
|
+
let(:matchables) do
|
45
|
+
[
|
46
|
+
klass.create(number: 'A')
|
47
|
+
]
|
48
|
+
end
|
49
|
+
let(:unmatchables) do
|
50
|
+
[
|
51
|
+
klass.create(number: 'B')
|
52
|
+
]
|
53
|
+
end
|
54
|
+
|
55
|
+
let!(:collection) { klass.where_multiple(query: { number: ['A'] }, sort: { number: :desc }) }
|
56
|
+
|
57
|
+
it 'returns correct results' do
|
58
|
+
collection
|
59
|
+
expect(matchables).to be_all do |matchable|
|
60
|
+
collection.include?(matchable)
|
61
|
+
end
|
62
|
+
expect(unmatchables).not_to be_any do |unmatchable|
|
63
|
+
collection.include?(unmatchable)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
pending 'performs n queries'
|
68
|
+
|
69
|
+
end
|
70
|
+
|
42
71
|
context "when query contains one key having an array-like value" do
|
43
72
|
|
44
73
|
let(:matchables) do
|
@@ -54,7 +83,7 @@ describe Journey::Resource::WhereMultiple do
|
|
54
83
|
]
|
55
84
|
end
|
56
85
|
|
57
|
-
let(:collection) { klass.where_multiple(query: { number: ['A', 'B'] }) }
|
86
|
+
let!(:collection) { klass.where_multiple(query: { number: ['A', 'B'] }) }
|
58
87
|
|
59
88
|
it 'returns correct results' do
|
60
89
|
expect(matchables).to be_all do |matchable|
|
@@ -88,7 +117,7 @@ describe Journey::Resource::WhereMultiple do
|
|
88
117
|
]
|
89
118
|
end
|
90
119
|
|
91
|
-
let(:collection) { klass.where_multiple(query: { number: ['A', 'B'], flash_number: ['1', '2'] }) }
|
120
|
+
let!(:collection) { klass.where_multiple(query: { number: ['A', 'B'], flash_number: ['1', '2'] }) }
|
92
121
|
|
93
122
|
it 'returns correct results' do
|
94
123
|
expect(matchables).to be_all do |matchable|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embark-journey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Davey
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_attr
|