Skip to content

Commit

Permalink
Define negated matcher properly
Browse files Browse the repository at this point in the history
Co-authored-by: Phil Pirozhkov <pirj@users.noreply.github.com>
  • Loading branch information
ka8725 and pirj committed Apr 24, 2023
1 parent e579b77 commit 09f56a1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions spec/rspec/rails/matchers/send_email_spec.rb
Expand Up @@ -119,12 +119,7 @@ def test_email
end

context "with a custom negated version defined" do
around do |example|
RSpec::Matchers.define_negated_matcher :not_send_email, :send_email
example.run
ensure
undef not_send_email
end
define_negated_matcher :not_send_email, :send_email

it "works with a negated version" do
expect {
Expand Down

0 comments on commit 09f56a1

Please sign in to comment.