summaryrefslogtreecommitdiff
path: root/spec/mspec/spec/matchers/include_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mspec/spec/matchers/include_spec.rb')
-rw-r--r--spec/mspec/spec/matchers/include_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/mspec/spec/matchers/include_spec.rb b/spec/mspec/spec/matchers/include_spec.rb
index f045c5e0cb..6bf1bef085 100644
--- a/spec/mspec/spec/matchers/include_spec.rb
+++ b/spec/mspec/spec/matchers/include_spec.rb
@@ -2,36 +2,36 @@ require 'spec_helper'
require 'mspec/expectations/expectations'
require 'mspec/matchers'
-describe IncludeMatcher do
+RSpec.describe IncludeMatcher do
it "matches when actual includes expected" do
- IncludeMatcher.new(2).matches?([1,2,3]).should == true
- IncludeMatcher.new("b").matches?("abc").should == true
+ expect(IncludeMatcher.new(2).matches?([1,2,3])).to eq(true)
+ expect(IncludeMatcher.new("b").matches?("abc")).to eq(true)
end
it "does not match when actual does not include expected" do
- IncludeMatcher.new(4).matches?([1,2,3]).should == false
- IncludeMatcher.new("d").matches?("abc").should == false
+ expect(IncludeMatcher.new(4).matches?([1,2,3])).to eq(false)
+ expect(IncludeMatcher.new("d").matches?("abc")).to eq(false)
end
it "matches when actual includes all expected" do
- IncludeMatcher.new(3, 2, 1).matches?([1,2,3]).should == true
- IncludeMatcher.new("a", "b", "c").matches?("abc").should == true
+ expect(IncludeMatcher.new(3, 2, 1).matches?([1,2,3])).to eq(true)
+ expect(IncludeMatcher.new("a", "b", "c").matches?("abc")).to eq(true)
end
it "does not match when actual does not include all expected" do
- IncludeMatcher.new(3, 2, 4).matches?([1,2,3]).should == false
- IncludeMatcher.new("a", "b", "c", "d").matches?("abc").should == false
+ expect(IncludeMatcher.new(3, 2, 4).matches?([1,2,3])).to eq(false)
+ expect(IncludeMatcher.new("a", "b", "c", "d").matches?("abc")).to eq(false)
end
it "provides a useful failure message" do
matcher = IncludeMatcher.new(5, 2)
matcher.matches?([1,2,3])
- matcher.failure_message.should == ["Expected [1, 2, 3]", "to include 5"]
+ expect(matcher.failure_message).to eq(["Expected [1, 2, 3]", "to include 5"])
end
it "provides a useful negative failure message" do
matcher = IncludeMatcher.new(1, 2, 3)
matcher.matches?([1,2,3])
- matcher.negative_failure_message.should == ["Expected [1, 2, 3]", "not to include 3"]
+ expect(matcher.negative_failure_message).to eq(["Expected [1, 2, 3]", "not to include 3"])
end
end