rspec-activerecord-expectations 2.1.0 → 2.1.1

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
  SHA256:
3
- metadata.gz: d320c1e0f80e96c3bbb2cb07df63b941aa9bb1aa3878f9ca46e6fa1fed483569
4
- data.tar.gz: 69487efb7a89d208d28a0d26faa3c74fc3315645803a1ec4162a6bd9f3677008
3
+ metadata.gz: a6e24b218adcab0f1e6fb117d66463a2cdf60996fe5c16f60d48f8efd37c3259
4
+ data.tar.gz: 4f0acb5f4c489f4b2ded11b7d27a1bec613d231b04d836f651a26daf1bdb5bb1
5
5
  SHA512:
6
- metadata.gz: 7db71325cbfa0abd65c7128cceb18ba8017af399bee5cdd4502d84a988c3865605f0c5d34f858af352c1520b401651723fbf1c2335d652ec45f9ef0308a675bb
7
- data.tar.gz: 44082fc8ad08369ea9e578f6cb3a11ec3dd7f92445b63ef4d415e10e14c79e350ded3a39828821b613513c382fd71b72db9b0669e7c14bd2e900655e03cffa5d
6
+ metadata.gz: d077a6aa43e9f243a4be0d5b4db338a2aa3272e49974b8cc9b987499571de846e6f5cbc4c9d1f4d3d58d50b1d91ce3d361f2719ee3073ae8eeeee589a62d3e8c
7
+ data.tar.gz: 4473b4f016d10ca617e4ef5b3b1550c44903a170e9fde1291a88097a264028a0e21383fa37324f063c9529412c52e70e6fb24fab9e7a6df2382568f6a763fbc5
data/CHANGELOG.md CHANGED
@@ -1,8 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.1.1] - 2022-01-12
4
+ - Gemspec is really generated using the version of ruby that's locally in use.
5
+ Update that build artifact to use non-java dependencies.
6
+
3
7
  ## [2.1.0] - 2022-01-12
4
- - change CI matrix for more version compatibility
5
- - update gemspec to move some deps into development only
8
+ - Change CI matrix for more version compatibility
9
+ - Update gemspec to move some deps into development only
6
10
  - README changes
7
11
 
8
12
  ## [2.0.0] - 2022-01-07
data/README.md CHANGED
@@ -119,7 +119,7 @@ queries, which may look like repeated loading.
119
119
  If your test has a small enough number of records that only one batch is
120
120
  loaded, your tests may work just fine. But otherwise, you may want to allow
121
121
  your code to specify a batch size in order to guarantee only a single batch
122
- is loaded:
122
+ is loaded.
123
123
 
124
124
  ```ruby
125
125
  tracks = Track.all
@@ -131,10 +131,13 @@ expect {
131
131
 
132
132
  ## Counting Queries
133
133
 
134
- ### Types of Comparisons
134
+ Some services won't necessarily have N+1 issues with records loading, but might
135
+ still have problems with executing too many queries. In this case, the
136
+ `repeatedly_load` matcher might be insufficient.
135
137
 
136
- Several comparison types are available, along with some aliases to allow for
137
- easier to read tests.
138
+ In this case, consider creating an expectation on the total number of queries
139
+ executed by your code. Several comparison types are available, along with some
140
+ aliases to allow for easier to read tests.
138
141
 
139
142
  ```ruby
140
143
  expect {}.to execute.less_than(20).queries
@@ -157,15 +160,10 @@ expect {}.to execute.at_least(1).query # singular form also accepted
157
160
 
158
161
  ### Specific Query Types
159
162
 
160
- You can of course make assertions for the total number of queries executed, but
161
- sometimes it's more valuable to assert particular _types_ of queries, such as
162
- inserts or find statements. Matchers are supported for this as well!
163
-
164
- **Note:** Transaction (for example, `ROLLBACK`) queries are not counted in any of these
165
- categories, nor are queries that load the DB schema.
166
-
167
- **Note:** Destroy and delete queries are both condensed into the matcher for
168
- `destroy_queries`.
163
+ You can make assertions for the total number of queries executed, but sometimes
164
+ it's more valuable to assert that a particular _type_ of query was executed.
165
+ For example, a particular number of queries to destroy records. There are
166
+ matchers available for that purpose as well!
169
167
 
170
168
  ```ruby
171
169
  expect {}.to execute.exactly(20).queries
@@ -179,6 +177,12 @@ expect {}.to execute.exactly(20).schema_queries
179
177
  expect {}.to execute.exactly(20).transaction_queries
180
178
  ```
181
179
 
180
+ **Note:** Transaction (for example, `ROLLBACK`) queries are not counted in any of these
181
+ categories, nor are queries that load the DB schema.
182
+
183
+ **Note:** Destroy and delete queries are both condensed into the matcher for
184
+ `destroy_queries`.
185
+
182
186
  ## Future Planned Functionality
183
187
 
184
188
  This gem still has lots of future functionality. See below.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "rspec-activerecord-expectations"
3
- spec.version = '2.1.0'
3
+ spec.version = '2.1.1'
4
4
  spec.authors = ["Joseph Mastey"]
5
5
  spec.email = ["hello@joemastey.com"]
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-activerecord-expectations
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joseph Mastey
@@ -11,6 +11,7 @@ cert_chain: []
11
11
  date: 2022-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: activerecord
14
15
  requirement: !ruby/object:Gem::Requirement
15
16
  requirements:
16
17
  - - ">="
@@ -19,9 +20,8 @@ dependencies:
19
20
  - - "<"
20
21
  - !ruby/object:Gem::Version
21
22
  version: 7.1.0
22
- name: activerecord
23
- prerelease: false
24
23
  type: :runtime
24
+ prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
@@ -31,42 +31,42 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: 7.1.0
33
33
  - !ruby/object:Gem::Dependency
34
+ name: sqlite3
34
35
  requirement: !ruby/object:Gem::Requirement
35
36
  requirements:
36
- - - ">="
37
+ - - "~>"
37
38
  - !ruby/object:Gem::Version
38
- version: '60'
39
- name: activerecord-jdbcsqlite3-adapter
40
- prerelease: false
39
+ version: '1.0'
41
40
  type: :development
41
+ prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '60'
46
+ version: '1.0'
47
47
  - !ruby/object:Gem::Dependency
48
+ name: pry
48
49
  requirement: !ruby/object:Gem::Requirement
49
50
  requirements:
50
51
  - - "~>"
51
52
  - !ruby/object:Gem::Version
52
53
  version: '0.0'
53
- name: pry
54
- prerelease: false
55
54
  type: :development
55
+ prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0.0'
61
61
  - !ruby/object:Gem::Dependency
62
+ name: appraisal
62
63
  requirement: !ruby/object:Gem::Requirement
63
64
  requirements:
64
65
  - - "~>"
65
66
  - !ruby/object:Gem::Version
66
67
  version: '2'
67
- name: appraisal
68
- prerelease: false
69
68
  type: :development
69
+ prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubygems_version: 3.2.29
131
+ rubygems_version: 3.1.6
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: A gem to test how many activerecord queries your code executes.