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

Commit c4f23a1

Browse files
committed
Use :skip instead of :if/:unless
1 parent 91ddf83 commit c4f23a1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/rspec/mocks/matchers/receive_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ module Mocks
5454
expect(receiver.foo).to eq(:curly)
5555
end
5656

57-
it 'does not support other matchers', :unless => options.include?(:allow_other_matchers) do
57+
it 'does not support other matchers', :skip => options.include?(:allow_other_matchers) do
5858
expect {
5959
wrapped.to eq(3)
6060
}.to raise_error(UnsupportedMatcherError)
6161
end
6262

63-
it 'does support inherited matchers', :unless => options.include?(:allow_other_matchers) do
63+
it 'does support inherited matchers', :skip => options.include?(:allow_other_matchers) do
6464
receive_foo = Class.new(RSpec::Mocks::Matchers::Receive).new(:foo, nil)
6565
wrapped.to receive_foo
6666
receiver.foo

spec/rspec/mocks/mutate_const_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def change_const_value_to(value)
170170
expect(::Hash).to equal(top_level_hash)
171171
end
172172

173-
it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings, :if => RUBY_VERSION < '2.5' do
173+
it 'does not affect the ability to access the top-level constant from nested contexts', :silence_warnings, :skip => RUBY_VERSION >= '2.5' do
174174
top_level_hash = ::Hash
175175

176176
hide_const("TestClass::Hash")

0 commit comments

Comments
 (0)