diff options
Diffstat (limited to 'spec/mspec/spec/matchers/be_kind_of_spec.rb')
-rw-r--r-- | spec/mspec/spec/matchers/be_kind_of_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/mspec/spec/matchers/be_kind_of_spec.rb b/spec/mspec/spec/matchers/be_kind_of_spec.rb index 7c4a59f7b9..1e19058411 100644 --- a/spec/mspec/spec/matchers/be_kind_of_spec.rb +++ b/spec/mspec/spec/matchers/be_kind_of_spec.rb @@ -2,30 +2,30 @@ require 'spec_helper' require 'mspec/expectations/expectations' require 'mspec/matchers' -describe BeKindOfMatcher do +RSpec.describe BeKindOfMatcher do it "matches when actual is a kind_of? expected" do - BeKindOfMatcher.new(Numeric).matches?(1).should == true - BeKindOfMatcher.new(Integer).matches?(2).should == true - BeKindOfMatcher.new(Regexp).matches?(/m/).should == true + expect(BeKindOfMatcher.new(Numeric).matches?(1)).to eq(true) + expect(BeKindOfMatcher.new(Integer).matches?(2)).to eq(true) + expect(BeKindOfMatcher.new(Regexp).matches?(/m/)).to eq(true) end it "does not match when actual is not a kind_of? expected" do - BeKindOfMatcher.new(Integer).matches?(1.5).should == false - BeKindOfMatcher.new(String).matches?(:a).should == false - BeKindOfMatcher.new(Hash).matches?([]).should == false + expect(BeKindOfMatcher.new(Integer).matches?(1.5)).to eq(false) + expect(BeKindOfMatcher.new(String).matches?(:a)).to eq(false) + expect(BeKindOfMatcher.new(Hash).matches?([])).to eq(false) end it "provides a useful failure message" do matcher = BeKindOfMatcher.new(Numeric) matcher.matches?('string') - matcher.failure_message.should == [ - "Expected \"string\" (String)", "to be kind of Numeric"] + expect(matcher.failure_message).to eq([ + "Expected \"string\" (String)", "to be kind of Numeric"]) end it "provides a useful negative failure message" do matcher = BeKindOfMatcher.new(Numeric) matcher.matches?(4.0) - matcher.negative_failure_message.should == [ - "Expected 4.0 (Float)", "not to be kind of Numeric"] + expect(matcher.negative_failure_message).to eq([ + "Expected 4.0 (Float)", "not to be kind of Numeric"]) end end |