diff options
Diffstat (limited to 'spec/mspec/spec/matchers/be_nil_spec.rb')
-rw-r--r-- | spec/mspec/spec/matchers/be_nil_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/mspec/spec/matchers/be_nil_spec.rb b/spec/mspec/spec/matchers/be_nil_spec.rb index 6551feb5de..e2768acf83 100644 --- a/spec/mspec/spec/matchers/be_nil_spec.rb +++ b/spec/mspec/spec/matchers/be_nil_spec.rb @@ -2,26 +2,26 @@ require 'spec_helper' require 'mspec/expectations/expectations' require 'mspec/matchers' -describe BeNilMatcher do +RSpec.describe BeNilMatcher do it "matches when actual is nil" do - BeNilMatcher.new.matches?(nil).should == true + expect(BeNilMatcher.new.matches?(nil)).to eq(true) end it "does not match when actual is not nil" do - BeNilMatcher.new.matches?("").should == false - BeNilMatcher.new.matches?(false).should == false - BeNilMatcher.new.matches?(0).should == false + expect(BeNilMatcher.new.matches?("")).to eq(false) + expect(BeNilMatcher.new.matches?(false)).to eq(false) + expect(BeNilMatcher.new.matches?(0)).to eq(false) end it "provides a useful failure message" do matcher = BeNilMatcher.new matcher.matches?("some string") - matcher.failure_message.should == ["Expected \"some string\"", "to be nil"] + expect(matcher.failure_message).to eq(["Expected \"some string\"", "to be nil"]) end it "provides a useful negative failure message" do matcher = BeNilMatcher.new matcher.matches?(nil) - matcher.negative_failure_message.should == ["Expected nil", "not to be nil"] + expect(matcher.negative_failure_message).to eq(["Expected nil", "not to be nil"]) end end |