rspec-block_is_expected 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +47 -3
- data/CODE_OF_CONDUCT.md +57 -47
- data/CONTRIBUTING.md +51 -0
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.md +236 -99
- data/SECURITY.md +13 -0
- data/lib/rspec/block_is_expected/matchers/not.rb +4 -4
- data/lib/rspec/block_is_expected/rspec.rb +7 -7
- data/lib/rspec/block_is_expected/shared_examples/block_does_not_raise_examples.rb +5 -0
- data/lib/rspec/block_is_expected/shared_examples/block_raises_error_examples.rb +5 -0
- data/lib/rspec/block_is_expected/version.rb +1 -1
- data/lib/rspec/block_is_expected.rb +2 -2
- data.tar.gz.sig +0 -0
- metadata +54 -84
- metadata.gz.sig +0 -0
- data/.gitignore +0 -15
- data/.rspec +0 -3
- data/.rubocop.yml +0 -52
- data/.rubocop_todo.yml +0 -32
- data/.tool-versions +0 -1
- data/.travis.yml +0 -61
- data/Appraisals +0 -32
- data/Gemfile +0 -22
- data/Gemfile.lock +0 -107
- data/Rakefile +0 -29
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/gemfiles/jruby_1.7.26.gemfile +0 -16
- data/gemfiles/jruby_9.1.9.0.gemfile +0 -15
- data/gemfiles/jruby_9.2.0.0.gemfile +0 -15
- data/gemfiles/jruby_head.gemfile +0 -15
- data/gemfiles/ruby_1.8.7_p374.gemfile +0 -16
- data/gemfiles/ruby_1.9.3_p551.gemfile +0 -16
- data/gemfiles/ruby_2.0.0_p648.gemfile +0 -16
- data/gemfiles/ruby_2.1.10.gemfile +0 -15
- data/gemfiles/ruby_2.2.10.gemfile +0 -16
- data/gemfiles/ruby_2.3.7.gemfile +0 -16
- data/gemfiles/ruby_2.4.4.gemfile +0 -16
- data/gemfiles/ruby_2.5.1.gemfile +0 -16
- data/gemfiles/ruby_head.gemfile +0 -16
- data/rspec-block_is_expected.gemspec +0 -41
data/README.md
CHANGED
@@ -1,35 +1,138 @@
|
|
1
1
|
# Rspec::BlockIsExpected
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
<div id="badges">
|
4
|
+
|
5
|
+
[![CI Build][🚎dl-cwfi]][🚎dl-cwf]
|
6
|
+
[![Test Coverage][🔑cc-covi]][🔑cc-cov]
|
7
|
+
[![Maintainability][🔑cc-mnti]][🔑cc-mnt]
|
8
|
+
[![Depfu][🔑depfui]][🔑depfu]
|
9
|
+
|
10
|
+
[🚎dl-cwf]: https://github.com/pboling/rspec-block_is_expected/actions/workflows/current.yml
|
11
|
+
[🚎dl-cwfi]: https://github.com/pboling/rspec-block_is_expected/actions/workflows/current.yml/badge.svg
|
12
|
+
|
13
|
+
[comment]: <> ( 🔑 KEYED LINKS )
|
14
|
+
|
15
|
+
[🔑cc-mnt]: https://codeclimate.com/github/pboling/rspec-block_is_expected/maintainability
|
16
|
+
[🔑cc-mnti]: https://api.codeclimate.com/v1/badges/ca0a12604ecc19f5e76d/maintainability
|
17
|
+
[🔑cc-cov]: https://codeclimate.com/github/pboling/rspec-block_is_expected/test_coverage
|
18
|
+
[🔑cc-covi]: https://api.codeclimate.com/v1/badges/ca0a12604ecc19f5e76d/test_coverage
|
19
|
+
[🔑depfu]: https://depfu.com/github/pboling/rspec-block_is_expected?project_id=5865
|
20
|
+
[🔑depfui]: https://badges.depfu.com/badges/79867e590f063376f40b031a1447c215/count.svg
|
21
|
+
|
22
|
+
-----
|
23
|
+
|
24
|
+
[![Liberapay Patrons][⛳liberapay-img]][⛳liberapay]
|
25
|
+
[![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor]
|
26
|
+
|
27
|
+
<span class="badge-buymeacoffee">
|
28
|
+
<a href="https://ko-fi.com/O5O86SNP4" target='_blank' title="Donate to my FLOSS or refugee efforts at ko-fi.com"><img src="https://img.shields.io/badge/buy%20me%20coffee-donate-yellow.svg" alt="Buy me coffee donation button" /></a>
|
29
|
+
</span>
|
30
|
+
<span class="badge-patreon">
|
31
|
+
<a href="https://patreon.com/galtzo" title="Donate to my FLOSS or refugee efforts using Patreon"><img src="https://img.shields.io/badge/patreon-donate-yellow.svg" alt="Patreon donate button" /></a>
|
32
|
+
</span>
|
33
|
+
|
34
|
+
</div>
|
35
|
+
|
36
|
+
[⛳liberapay-img]: https://img.shields.io/liberapay/patrons/pboling.svg?logo=liberapay
|
37
|
+
[⛳liberapay]: https://liberapay.com/pboling/donate
|
38
|
+
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
|
39
|
+
[🖇sponsor]: https://github.com/sponsors/pboling
|
40
|
+
|
41
|
+
This gem does ~~five~~, _three sir_, five things.
|
42
|
+
|
43
|
+
1. Provides `block_is_expected` to set expectations on the result of running the `subject` as a block.
|
44
|
+
2. Provides, via shared example groups, shortcut RSpec macros for setting an expectation on errors being raised (or not).
|
45
|
+
```ruby
|
46
|
+
it_behaves_like "block_is_expected to not raise"
|
47
|
+
it_behaves_like "block_is_expected to raise error", RuntimeError
|
48
|
+
```
|
49
|
+
3. Provides RSpec negated matchers that can be used with `block_is_expected`:
|
50
|
+
```ruby
|
51
|
+
not_change
|
52
|
+
not_raise_error
|
53
|
+
```
|
54
|
+
And two others that are so generally useful I end up defining them on every project:
|
55
|
+
```ruby
|
56
|
+
not_include
|
57
|
+
not_eq
|
58
|
+
```
|
59
|
+
|
60
|
+
## Just show me the money
|
61
|
+
|
62
|
+
First, configure in your rspec helper, or similar:
|
5
63
|
```ruby
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
64
|
+
require "rspec/block_is_expected"
|
65
|
+
```
|
66
|
+
|
67
|
+
Then,
|
68
|
+
|
69
|
+
1. Custom expectation on result of subject as block
|
70
|
+
```ruby
|
71
|
+
subject { Integer("1") }
|
72
|
+
it("raises") { block_is_expected.to(not_raise_error) }
|
73
|
+
```
|
74
|
+
2. Subject will not raise an exception
|
75
|
+
```ruby
|
76
|
+
subject { Integer("1") }
|
77
|
+
it_behaves_like "block_is_expected to not raise"
|
78
|
+
```
|
79
|
+
3. Subject will raise an exception
|
80
|
+
```ruby
|
81
|
+
subject { Integer(nil) }
|
82
|
+
it_behaves_like "block_is_expected to raise error", TypeError
|
83
|
+
```
|
84
|
+
|
85
|
+
| Project | `bundle add rspec-block_is_expected --group test` |
|
86
|
+
|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
87
|
+
| name, license, docs, standards | [![RubyGems.org][⛳️name-img]][⛳️gem] [![License: MIT][🖇src-license-img]][🖇src-license] [![RubyDoc.info][🚎yard-img]][🚎yard] [![SemVer 2.0.0][🧮semver-img]][🧮semver] [![Keep-A-Changelog 1.0.0][📗keep-changelog-img]][📗keep-changelog] |
|
88
|
+
| version & activity | [![Gem Version][⛳️version-img]][⛳️gem] [![Total Downloads][🖇DL-total-img]][⛳️gem] [![Download Rank][🏘DL-rank-img]][⛳️gem] |
|
89
|
+
| dependencies | [![Depfu][🔑depfui]][🔑depfu] |
|
90
|
+
| continuous integration | [![CI Build][🚎dl-cwfi]][🚎dl-cwf] [![Heads][🖐hwfi]][🖐hwf] [![Style][🧮swfi]][🧮swf] |
|
91
|
+
| test coverage | [![Test Coverage][🔑cc-covi]][🔑cc-cov] |
|
92
|
+
| maintainability | [![Maintainability](https://api.codeclimate.com/v1/badges/ca0a12604ecc19f5e76d/maintainability)](https://codeclimate.com/github/pboling/rspec-block_is_expected/maintainability) |
|
93
|
+
| code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/rspec-block_is_expected/badges/users.svg)](https://www.codetriage.com/pboling/rspec-block_is_expected) |
|
94
|
+
| homepage | [on Github.com][homepage], [on Railsbling.com][blogpage] |
|
95
|
+
| documentation | [on RDoc.info][documentation] |
|
96
|
+
| `...` 💖 | [![Liberapay Goal Progress][⛳liberapay-img]][⛳liberapay], [🧊][🧊berg], [🛖][🛖hut], [🧪][🧪lab], [🌏][aboutme], [👼][angellist], [⚗️][devto], [![Tweet @galtzo][followme]][twitter] |
|
97
|
+
|
98
|
+
<!--
|
99
|
+
The link tokens in the following sections should be kept ordered by the row and badge numbering scheme
|
100
|
+
-->
|
101
|
+
|
102
|
+
<!-- 1️⃣ name, license, docs -->
|
103
|
+
[⛳️gem]: https://rubygems.org/gems/rspec-block_is_expected
|
104
|
+
[⛳️name-img]: https://img.shields.io/badge/name-rspec--block__is__expected-brightgreen.svg?style=flat
|
105
|
+
[🖇src-license]: https://opensource.org/licenses/MIT
|
106
|
+
[🖇src-license-img]: https://img.shields.io/badge/License-MIT-green.svg
|
107
|
+
[🚎yard]: https://www.rubydoc.info/gems/rspec-block_is_expected
|
108
|
+
[🚎yard-img]: https://img.shields.io/badge/documentation-rubydoc-brightgreen.svg?style=flat
|
109
|
+
[🧮semver]: http://semver.org/
|
110
|
+
[🧮semver-img]: https://img.shields.io/badge/semver-2.0.0-FFDD67.svg?style=flat
|
111
|
+
[📗keep-changelog]: https://keepachangelog.com/en/1.0.0/
|
112
|
+
[📗keep-changelog-img]: https://img.shields.io/badge/keep--a--changelog-1.0.0-FFDD67.svg?style=flat
|
113
|
+
|
114
|
+
<!-- 2️⃣ version & activity -->
|
115
|
+
[⛳️version-img]: http://img.shields.io/gem/v/rspec-block_is_expected.svg
|
116
|
+
[🖇DL-total-img]: https://img.shields.io/gem/dt/rspec-block_is_expected.svg
|
117
|
+
[🏘DL-rank-img]: https://img.shields.io/gem/rt/rspec-block_is_expected.svg
|
118
|
+
|
119
|
+
[🖐hwf]: https://github.com/pboling/rspec-block_is_expected/actions/workflows/heads.yml
|
120
|
+
[🖐hwfi]: https://github.com/pboling/rspec-block_is_expected/actions/workflows/heads.yml/badge.svg
|
121
|
+
[🧮swf]: https://github.com/pboling/rspec-block_is_expected/actions/workflows/style.yml
|
122
|
+
[🧮swfi]: https://github.com/pboling/rspec-block_is_expected/actions/workflows/style.yml/badge.svg
|
123
|
+
|
124
|
+
If you only _ever_ want to test subjects wrapped in blocks, and are comfortable with **losing** the standard `is_expected` behavior, see an alternative to this gem [here](https://github.com/christopheraue/ruby-rspec-is_expected_block/).
|
125
|
+
|
126
|
+
## Ruby Compatibility
|
127
|
+
Supports the same versions of Ruby that RSpec does, 1.8.7 - current ruby-head,
|
128
|
+
as well as the JRuby equivalents.
|
26
129
|
|
27
130
|
## Installation
|
28
131
|
|
29
132
|
Add this line to your application's Gemfile:
|
30
133
|
|
31
134
|
```ruby
|
32
|
-
gem
|
135
|
+
gem "rspec-block_is_expected", :group => :test
|
33
136
|
```
|
34
137
|
|
35
138
|
And then execute:
|
@@ -46,7 +149,7 @@ There is no configuration needed if you your test suite loads the bundle group (
|
|
46
149
|
|
47
150
|
Otherwise, you may load it manually near the top of your `spec_helper.rb`, and it will self configure.
|
48
151
|
```ruby
|
49
|
-
require
|
152
|
+
require "rspec/block_is_expected"
|
50
153
|
```
|
51
154
|
|
52
155
|
### RSpec Matchers
|
@@ -56,15 +159,15 @@ but `to_not` doesn't work with multiple expectations.
|
|
56
159
|
So negated matchers are required. A basic set of them are included with this gem, and can be loaded with:
|
57
160
|
|
58
161
|
```ruby
|
59
|
-
require
|
162
|
+
require "rspec/block_is_expected/matchers/not"
|
60
163
|
```
|
61
164
|
|
62
165
|
This gives you the following matchers:
|
63
166
|
```ruby
|
64
|
-
RSpec::Matchers.define_negated_matcher
|
65
|
-
RSpec::Matchers.define_negated_matcher
|
66
|
-
RSpec::Matchers.define_negated_matcher
|
67
|
-
RSpec::Matchers.define_negated_matcher
|
167
|
+
RSpec::Matchers.define_negated_matcher(:not_change, :change)
|
168
|
+
RSpec::Matchers.define_negated_matcher(:not_include, :include)
|
169
|
+
RSpec::Matchers.define_negated_matcher(:not_eq, :eq)
|
170
|
+
RSpec::Matchers.define_negated_matcher(:not_raise_error, :raise_error)
|
68
171
|
```
|
69
172
|
|
70
173
|
#### Example
|
@@ -72,28 +175,28 @@ RSpec::Matchers.define_negated_matcher :not_raise_error, :raise_error
|
|
72
175
|
You have a module like this:
|
73
176
|
|
74
177
|
```ruby
|
75
|
-
module MyTasks
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
end
|
178
|
+
module MyTasks
|
179
|
+
def my_rakelib
|
180
|
+
Rake.add_rakelib("bananas")
|
181
|
+
end
|
182
|
+
module_function :my_rakelib
|
183
|
+
end
|
81
184
|
```
|
82
185
|
|
83
186
|
You have a spec like this:
|
84
187
|
|
85
188
|
```ruby
|
86
|
-
require
|
87
|
-
|
88
|
-
RSpec.describe(MyTasks) do
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
189
|
+
require "rake"
|
190
|
+
|
191
|
+
RSpec.describe(MyTasks) do
|
192
|
+
describe "my_rakelib" do
|
193
|
+
subject(:my_rakelib) { described_class.my_rakelib }
|
194
|
+
it "updates rakelib" do
|
195
|
+
block_is_expected.to(not_raise_error &
|
196
|
+
change { Rake.application.options.rakelib }.from(["rakelib"]).to(%w[rakelib bananas]))
|
197
|
+
end
|
198
|
+
end
|
94
199
|
end
|
95
|
-
end
|
96
|
-
end
|
97
200
|
```
|
98
201
|
|
99
202
|
### Integration with RuboCop
|
@@ -115,36 +218,46 @@ inherit_gem:
|
|
115
218
|
The spec suite for this gem has some examples of usage, lightly edited here.
|
116
219
|
|
117
220
|
```ruby
|
118
|
-
RSpec.describe
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
221
|
+
RSpec.describe("TestyMcTest") do
|
222
|
+
context "errors raised" do
|
223
|
+
subject { Integer(nil) }
|
224
|
+
it("can be tested") do
|
225
|
+
# Where you used to have:
|
226
|
+
# expect { subject }.to raise_error(TypeError)
|
227
|
+
block_is_expected.to(raise_error(TypeError))
|
228
|
+
end
|
229
|
+
end
|
230
|
+
context "execution" do
|
231
|
+
let(:mutex) { Mutex.new }
|
232
|
+
subject { mutex.lock }
|
233
|
+
it("can change state") do
|
234
|
+
expect(mutex.locked?).to(eq(false))
|
235
|
+
# Where you used to have:
|
236
|
+
# expect { subject }.to_not raise_error
|
237
|
+
block_is_expected.to_not(raise_error)
|
238
|
+
expect(mutex.locked?).to(eq(true))
|
239
|
+
end
|
240
|
+
end
|
241
|
+
context "changed state" do
|
242
|
+
let(:mutex) { Mutex.new }
|
243
|
+
subject { mutex.lock }
|
244
|
+
it("can be tested") do
|
245
|
+
# Where you used to have:
|
246
|
+
# expect { subject }.to change { mutex.locked? }.from(false).to(true)
|
247
|
+
block_is_expected.to(change { mutex.locked? }.from(false).to(true))
|
248
|
+
end
|
249
|
+
end
|
145
250
|
end
|
146
|
-
|
147
|
-
|
251
|
+
```
|
252
|
+
|
253
|
+
## Switch to `main` branch
|
254
|
+
|
255
|
+
We recently migrated from `master` to `main` as the default branch. If this affected your local checkout:
|
256
|
+
```shell
|
257
|
+
git branch -m master main
|
258
|
+
git fetch origin
|
259
|
+
git branch -u origin/main main
|
260
|
+
git remote set-head origin -a
|
148
261
|
```
|
149
262
|
|
150
263
|
## Development
|
@@ -155,26 +268,40 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
155
268
|
|
156
269
|
## Authors
|
157
270
|
|
158
|
-
[Peter H. Boling][peterboling] of [Rails Bling][railsbling] is the author.
|
271
|
+
* [Peter H. Boling][peterboling] of [Rails Bling][railsbling] is the author.
|
159
272
|
|
160
|
-
##
|
273
|
+
## Contributing
|
161
274
|
|
162
|
-
See
|
275
|
+
See [CONTRIBUTING.md][contributing].
|
276
|
+
[contributing]: https://gitlab.com/pboling/rspec-block_is_expected/-/blob/main/CONTRIBUTING.md
|
163
277
|
|
164
278
|
## Contributing
|
165
279
|
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
280
|
+
See [CONTRIBUTING.md][contributing].
|
281
|
+
[contributing]: https://gitlab.com/pboling/rspec-stubbed_env/-/blob/main/CONTRIBUTING.md
|
282
|
+
|
283
|
+
### Running Specs
|
284
|
+
|
285
|
+
The basic compatibility matrix:
|
286
|
+
```sh
|
287
|
+
appraisal install
|
288
|
+
appraisal rake test
|
289
|
+
```
|
290
|
+
|
291
|
+
Sometimes also:
|
292
|
+
```sh
|
293
|
+
BUNDLE_GEMFILE=gemfiles/vanilla.gemfile appraisal update
|
294
|
+
```
|
295
|
+
|
296
|
+
NOTE: This results in bad paths to the gemspec.
|
297
|
+
`gemspec path: "../../"` needs to be replaced with `gemspec :path => "../"` in each Appraisal gemfile.
|
172
298
|
|
173
|
-
|
299
|
+
Except, is unlikely to be possible to install all of the supported Rubies & Railsies in a single container...
|
300
|
+
See the various github action workflows for more inspiration on running certain oldies.
|
174
301
|
|
175
302
|
## Code of Conduct
|
176
303
|
|
177
|
-
Everyone interacting in the AnonymousActiveRecord project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct]
|
304
|
+
Everyone interacting in the AnonymousActiveRecord project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct][conduct].
|
178
305
|
|
179
306
|
## Versioning
|
180
307
|
|
@@ -190,29 +317,39 @@ dependency on this gem using the [Pessimistic Version Constraint][pvc] with two
|
|
190
317
|
|
191
318
|
For example in a `Gemfile`:
|
192
319
|
|
193
|
-
|
320
|
+
```ruby
|
321
|
+
gem "rspec-block_is_expected", "~> 1.0", :group => [:development, :test]
|
322
|
+
```
|
194
323
|
|
195
324
|
or in a `gemspec`
|
196
325
|
|
197
|
-
|
326
|
+
```ruby
|
327
|
+
spec.add_development_dependency("rspec-block_is_expected", "~> 1.0")
|
328
|
+
```
|
198
329
|
|
199
330
|
## Legal
|
200
331
|
|
201
|
-
*
|
332
|
+
* Copyright © 2018, 2020, 2023 - 2024 [Peter H. Boling][peterboling] of [Rails Bling][railsbling]
|
202
333
|
|
203
|
-
|
334
|
+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
|
204
335
|
|
205
|
-
[
|
206
|
-
[
|
336
|
+
[aboutme]: https://about.me/peter.boling
|
337
|
+
[angellist]: https://angel.co/peter-boling
|
338
|
+
[blogpage]: http://www.railsbling.com/tags/rspec-block_is_expected/
|
339
|
+
[conduct]: CODE_OF_CONDUCT.md
|
340
|
+
[contributing]: CONTRIBUTING.md
|
341
|
+
[devto]: https://dev.to/galtzo
|
207
342
|
[documentation]: http://rdoc.info/github/pboling/rspec-block_is_expected/frames
|
343
|
+
[followme]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow
|
208
344
|
[homepage]: https://github.com/pboling/rspec-block_is_expected
|
209
|
-
[
|
210
|
-
[license]: LICENSE
|
211
|
-
[railsbling]: http://www.railsbling.com
|
345
|
+
[license]: LICENSE.txt
|
212
346
|
[peterboling]: https://about.me/peter.boling
|
213
|
-
[
|
214
|
-
[
|
215
|
-
[
|
216
|
-
[angellist]: https://angel.co/peter-boling
|
217
|
-
[coderwall]: http://coderwall.com/pboling
|
347
|
+
[pvc]: http://guides.rubygems.org/patterns/#pessimistic-version-constraint
|
348
|
+
[railsbling]: http://www.railsbling.com
|
349
|
+
[semver]: http://semver.org/
|
218
350
|
[twitter]: http://twitter.com/galtzo
|
351
|
+
[🧊berg]: https://codeberg.org/pboling
|
352
|
+
[🛖hut]: https://sr.ht/~galtzo/
|
353
|
+
[🧪lab]: https://gitlab.com/pboling
|
354
|
+
[⛳liberapay]: https://liberapay.com/pboling/donate
|
355
|
+
[⛳liberapay-img]: https://img.shields.io/liberapay/goal/pboling.svg?logo=liberapay
|
data/SECURITY.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Security Policy
|
2
|
+
|
3
|
+
## Supported Versions
|
4
|
+
|
5
|
+
| Version | Supported |
|
6
|
+
|----------|-----------|
|
7
|
+
| 1.latest | ✅ |
|
8
|
+
|
9
|
+
## Reporting a Vulnerability
|
10
|
+
|
11
|
+
Peter Boling is the primary maintainer of this gem. Please find a way
|
12
|
+
to [contact him directly](https://railsbling.com/contact) to report the issue. Include as much relevant information as
|
13
|
+
possible.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
RSpec::Matchers.define_negated_matcher
|
2
|
-
RSpec::Matchers.define_negated_matcher
|
3
|
-
RSpec::Matchers.define_negated_matcher
|
4
|
-
RSpec::Matchers.define_negated_matcher
|
1
|
+
RSpec::Matchers.define_negated_matcher(:not_change, :change)
|
2
|
+
RSpec::Matchers.define_negated_matcher(:not_include, :include)
|
3
|
+
RSpec::Matchers.define_negated_matcher(:not_eq, :eq)
|
4
|
+
RSpec::Matchers.define_negated_matcher(:not_raise_error, :raise_error)
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
rescue NameError
|
7
|
-
# Rspec really should be loaded by now...
|
1
|
+
require "rspec/core"
|
2
|
+
require "rspec/block_is_expected/matchers/not"
|
3
|
+
|
4
|
+
RSpec.configure do |c|
|
5
|
+
c.include(Rspec::BlockIsExpected)
|
8
6
|
end
|
7
|
+
require "rspec/block_is_expected/shared_examples/block_does_not_raise_examples"
|
8
|
+
require "rspec/block_is_expected/shared_examples/block_raises_error_examples"
|
data.tar.gz.sig
ADDED
Binary file
|