diff options
Diffstat (limited to 'spec/mspec/spec/matchers/have_private_method_spec.rb')
-rw-r--r-- | spec/mspec/spec/matchers/have_private_method_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/mspec/spec/matchers/have_private_method_spec.rb b/spec/mspec/spec/matchers/have_private_method_spec.rb index e63a9a3c2f..f433288057 100644 --- a/spec/mspec/spec/matchers/have_private_method_spec.rb +++ b/spec/mspec/spec/matchers/have_private_method_spec.rb @@ -9,36 +9,36 @@ class HPMMSpecs private_class_method :private_method end -describe HavePrivateMethodMatcher do +RSpec.describe HavePrivateMethodMatcher do it "inherits from MethodMatcher" do - HavePrivateMethodMatcher.new(:m).should be_kind_of(MethodMatcher) + expect(HavePrivateMethodMatcher.new(:m)).to be_kind_of(MethodMatcher) end it "matches when mod has the private method" do matcher = HavePrivateMethodMatcher.new :private_method - matcher.matches?(HPMMSpecs).should be_true + expect(matcher.matches?(HPMMSpecs)).to be_truthy end it "does not match when mod does not have the private method" do matcher = HavePrivateMethodMatcher.new :another_method - matcher.matches?(HPMMSpecs).should be_false + expect(matcher.matches?(HPMMSpecs)).to be_falsey end it "provides a failure message for #should" do matcher = HavePrivateMethodMatcher.new :some_method matcher.matches?(HPMMSpecs) - matcher.failure_message.should == [ + expect(matcher.failure_message).to eq([ "Expected HPMMSpecs to have private method 'some_method'", "but it does not" - ] + ]) end it "provides a failure message for #should_not" do matcher = HavePrivateMethodMatcher.new :private_method matcher.matches?(HPMMSpecs) - matcher.negative_failure_message.should == [ + expect(matcher.negative_failure_message).to eq([ "Expected HPMMSpecs NOT to have private method 'private_method'", "but it does" - ] + ]) end end |