diff options
Diffstat (limited to 'spec/mspec/spec/matchers/have_singleton_method_spec.rb')
-rw-r--r-- | spec/mspec/spec/matchers/have_singleton_method_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/mspec/spec/matchers/have_singleton_method_spec.rb b/spec/mspec/spec/matchers/have_singleton_method_spec.rb index 57c37e01d9..61ef00d49c 100644 --- a/spec/mspec/spec/matchers/have_singleton_method_spec.rb +++ b/spec/mspec/spec/matchers/have_singleton_method_spec.rb @@ -7,14 +7,14 @@ class HSMMSpecs end end -describe HaveSingletonMethodMatcher do +RSpec.describe HaveSingletonMethodMatcher do it "inherits from MethodMatcher" do - HaveSingletonMethodMatcher.new(:m).should be_kind_of(MethodMatcher) + expect(HaveSingletonMethodMatcher.new(:m)).to be_kind_of(MethodMatcher) end it "matches when the class has a singleton method" do matcher = HaveSingletonMethodMatcher.new :singleton_method - matcher.matches?(HSMMSpecs).should be_true + expect(matcher.matches?(HSMMSpecs)).to be_truthy end it "matches when the object has a singleton method" do @@ -22,24 +22,24 @@ describe HaveSingletonMethodMatcher do def obj.singleton_method; end matcher = HaveSingletonMethodMatcher.new :singleton_method - matcher.matches?(obj).should be_true + expect(matcher.matches?(obj)).to be_truthy end it "provides a failure message for #should" do matcher = HaveSingletonMethodMatcher.new :some_method matcher.matches?(HSMMSpecs) - matcher.failure_message.should == [ + expect(matcher.failure_message).to eq([ "Expected HSMMSpecs to have singleton method 'some_method'", "but it does not" - ] + ]) end it "provides a failure message for #should_not" do matcher = HaveSingletonMethodMatcher.new :singleton_method matcher.matches?(HSMMSpecs) - matcher.negative_failure_message.should == [ + expect(matcher.negative_failure_message).to eq([ "Expected HSMMSpecs NOT to have singleton method 'singleton_method'", "but it does" - ] + ]) end end |