diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-03-27 13:02:38 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-03-27 13:02:38 +0100 |
commit | 44736a6b7a2b3475db2d05187f33e3c1a7b4b4e5 (patch) | |
tree | 4cb679a8742121782a50e72e01160d19f479f9a6 /spec/mspec/spec/matchers/be_nil_spec.rb | |
parent | 31ae931e166825450dcc16d470553e67281951a2 (diff) |
Update to ruby/mspec@d1adf59
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 |