From 5aa50d0e17fe1f79d4dcb8a56117303da7cfb397 Mon Sep 17 00:00:00 2001 From: Phil Pirozhkov Date: Wed, 23 Dec 2020 20:25:26 +0300 Subject: [PATCH] [support] Fix specs not to use should syntax This commit was imported from https://github.com/rspec/rspec-support/commit/837a5e726392e1d40c6773537612aa90c17449b6. --- .../spec/rspec/support/comparable_version_spec.rb | 2 +- rspec-support/spec/rspec/support_spec.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rspec-support/spec/rspec/support/comparable_version_spec.rb b/rspec-support/spec/rspec/support/comparable_version_spec.rb index 4fa4d1bf5..c13bda581 100644 --- a/rspec-support/spec/rspec/support/comparable_version_spec.rb +++ b/rspec-support/spec/rspec/support/comparable_version_spec.rb @@ -31,7 +31,7 @@ module RSpec::Support ComparableVersion.new(subject_string) <=> ComparableVersion.new(other_string) end - it { should eq(expected) } + it { is_expected.to eq(expected) } end end end diff --git a/rspec-support/spec/rspec/support_spec.rb b/rspec-support/spec/rspec/support_spec.rb index 21d174339..c0c6ee100 100644 --- a/rspec-support/spec/rspec/support_spec.rb +++ b/rspec-support/spec/rspec/support_spec.rb @@ -123,7 +123,7 @@ def method_missing(name, *args, &block) 'foo' end - it { should equal(String) } + it { is_expected.to equal(String) } end context 'with a BasicObject instance' do @@ -131,7 +131,7 @@ def method_missing(name, *args, &block) BasicObject.new end - it { should equal(BasicObject) } + it { is_expected.to equal(BasicObject) } end context 'with nil' do @@ -139,7 +139,7 @@ def method_missing(name, *args, &block) nil end - it { should equal(NilClass) } + it { is_expected.to equal(NilClass) } end context 'with an object having a singleton class' do @@ -162,7 +162,7 @@ def object.some_method String end - it { should equal(Class) } + it { is_expected.to equal(Class) } end end