Skip to content
This repository has been archived by the owner on Nov 30, 2024. It is now read-only.

Commit

Permalink
Try !~ instead - <= 1.8.7 do not error as expected with '!='
Browse files Browse the repository at this point in the history
  • Loading branch information
nevinera committed May 9, 2024
1 parent f31af7e commit 13fa00b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/rspec/matchers/built_in/operators_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ def method_missing(name, *args, &block)

it "complains when negated" do
expect {
o.should != o
}.to raise_error(/does not support `should != .*Use `should_not ==/)
o.should !~ o
}.to raise_error(/does not support `should !~ .*Use `should_not =~/)
end

it "is described correctly" do
Expand All @@ -262,8 +262,8 @@ def method_missing(name, *args, &block)

it "complains when negated" do
expect {
o.should_not != :foo
}.to raise_error(/does not support `should_not != .*Use `should ==/)
o.should_not !~ :foo
}.to raise_error(/does not support `should_not !~ .*Use `should =~/)
end

it "is described correctly" do
Expand Down

0 comments on commit 13fa00b

Please sign in to comment.