db-query-matchers 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/db_query_matchers/make_database_queries.rb +3 -2
- data/lib/db_query_matchers/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c447c07e6987950a4c77c944c2ebc2189333c8b
|
4
|
+
data.tar.gz: 70e96328bb6693aa75bc4c125c1b3ac0280df126
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 147475533f512037b565e1770cad433820190732357c19bcda826a8b2c89321647bbf44361f8e4f16fda4091e8498a8b244c0957d3fd8694bb4b0f4e0d15057f
|
7
|
+
data.tar.gz: b79ee04b47c5e38578fd193716c67465e7237946d7cb3f4e47a6c49402eac1b6e3cb36666abc0261c0aa04d5aa5abb06717b43549b8889bcbdc961f3bbee5868
|
@@ -10,6 +10,7 @@ require 'rspec'
|
|
10
10
|
#
|
11
11
|
# @see QueryCounter
|
12
12
|
RSpec::Matchers.define :make_database_queries do |options = {}|
|
13
|
+
supports_block_expectations
|
13
14
|
|
14
15
|
# Taken from ActionView::Helpers::TextHelper
|
15
16
|
def pluralize(count, singular, plural = nil)
|
@@ -34,14 +35,14 @@ RSpec::Matchers.define :make_database_queries do |options = {}|
|
|
34
35
|
end
|
35
36
|
end
|
36
37
|
|
37
|
-
|
38
|
+
failure_message_when_negated do |_|
|
38
39
|
<<-EOS
|
39
40
|
expected no queries, but #{@counter.count} were made:
|
40
41
|
#{@counter.log.join("\n")}
|
41
42
|
EOS
|
42
43
|
end
|
43
44
|
|
44
|
-
|
45
|
+
failure_message do |_|
|
45
46
|
if options[:count]
|
46
47
|
expected = pluralize(options[:count], 'query')
|
47
48
|
actual = pluralize(@counter.count, 'was', 'were')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db-query-matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Causes Engineering
|
@@ -10,62 +10,62 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-
|
13
|
+
date: 2014-06-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
21
|
+
version: '3.0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
|
-
- -
|
26
|
+
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: '0'
|
28
|
+
version: '3.0'
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: activesupport
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
|
-
- - ~>
|
33
|
+
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
35
|
version: '4.0'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
|
-
- - ~>
|
40
|
+
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '4.0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: activerecord
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- - ~>
|
47
|
+
- - "~>"
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '4.0'
|
50
50
|
type: :development
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
|
-
- - ~>
|
54
|
+
- - "~>"
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
version: '4.0'
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: sqlite3
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- -
|
61
|
+
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
63
|
version: '0'
|
64
64
|
type: :development
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
|
-
- -
|
68
|
+
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
description:
|
@@ -78,9 +78,9 @@ extensions: []
|
|
78
78
|
extra_rdoc_files: []
|
79
79
|
files:
|
80
80
|
- lib/db_query_matchers.rb
|
81
|
-
- lib/db_query_matchers/version.rb
|
82
81
|
- lib/db_query_matchers/make_database_queries.rb
|
83
82
|
- lib/db_query_matchers/query_counter.rb
|
83
|
+
- lib/db_query_matchers/version.rb
|
84
84
|
homepage: https://github.com/causes/db-query-matchers
|
85
85
|
licenses:
|
86
86
|
- MIT
|
@@ -91,17 +91,17 @@ require_paths:
|
|
91
91
|
- lib
|
92
92
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- -
|
99
|
+
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.0
|
104
|
+
rubygems_version: 2.2.0
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: RSpec matchers for database queries
|