Skip to content

Commit 09f56a1

Browse files
ka8725pirj
andauthored
Define negated matcher properly
Co-authored-by: Phil Pirozhkov <[email protected]>
1 parent e579b77 commit 09f56a1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

spec/rspec/rails/matchers/send_email_spec.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,7 @@ def test_email
119119
end
120120

121121
context "with a custom negated version defined" do
122-
around do |example|
123-
RSpec::Matchers.define_negated_matcher :not_send_email, :send_email
124-
example.run
125-
ensure
126-
undef not_send_email
127-
end
122+
define_negated_matcher :not_send_email, :send_email
128123

129124
it "works with a negated version" do
130125
expect {

0 commit comments

Comments
 (0)