Skip to content

Commit

Permalink
Hide the example where it does not apply
Browse files Browse the repository at this point in the history
  • Loading branch information
pirj committed Aug 24, 2019
1 parent 6988072 commit 6b9fd9e
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions spec/support/shared_examples/matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
end

it 'can match negatively properly' do
unless options[:disallows_negation]
invalid_expectation.not_to matcher
invalid_expectation.not_to matcher

expect {
valid_expectation.not_to matcher
}.to fail
end
end
expect {
valid_expectation.not_to matcher
}.to fail
end unless options[:disallows_negation]
end

0 comments on commit 6b9fd9e

Please sign in to comment.