summaryrefslogtreecommitdiff
path: root/spec/mspec/spec/matchers/eql_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/mspec/spec/matchers/eql_spec.rb')
-rw-r--r--spec/mspec/spec/matchers/eql_spec.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/spec/mspec/spec/matchers/eql_spec.rb b/spec/mspec/spec/matchers/eql_spec.rb
index f29e6976da..66307d2a9d 100644
--- a/spec/mspec/spec/matchers/eql_spec.rb
+++ b/spec/mspec/spec/matchers/eql_spec.rb
@@ -2,32 +2,32 @@ require 'spec_helper'
require 'mspec/expectations/expectations'
require 'mspec/matchers'
-describe EqlMatcher do
+RSpec.describe EqlMatcher do
it "matches when actual is eql? to expected" do
- EqlMatcher.new(1).matches?(1).should == true
- EqlMatcher.new(1.5).matches?(1.5).should == true
- EqlMatcher.new("red").matches?("red").should == true
- EqlMatcher.new(:blue).matches?(:blue).should == true
- EqlMatcher.new(Object).matches?(Object).should == true
+ expect(EqlMatcher.new(1).matches?(1)).to eq(true)
+ expect(EqlMatcher.new(1.5).matches?(1.5)).to eq(true)
+ expect(EqlMatcher.new("red").matches?("red")).to eq(true)
+ expect(EqlMatcher.new(:blue).matches?(:blue)).to eq(true)
+ expect(EqlMatcher.new(Object).matches?(Object)).to eq(true)
o = Object.new
- EqlMatcher.new(o).matches?(o).should == true
+ expect(EqlMatcher.new(o).matches?(o)).to eq(true)
end
it "does not match when actual is not eql? to expected" do
- EqlMatcher.new(1).matches?(1.0).should == false
- EqlMatcher.new(Hash).matches?(Object).should == false
+ expect(EqlMatcher.new(1).matches?(1.0)).to eq(false)
+ expect(EqlMatcher.new(Hash).matches?(Object)).to eq(false)
end
it "provides a useful failure message" do
matcher = EqlMatcher.new("red")
matcher.matches?("red")
- matcher.failure_message.should == ["Expected \"red\"", "to have same value and type as \"red\""]
+ expect(matcher.failure_message).to eq(["Expected \"red\"", "to have same value and type as \"red\""])
end
it "provides a useful negative failure message" do
matcher = EqlMatcher.new(1)
matcher.matches?(1.0)
- matcher.negative_failure_message.should == ["Expected 1.0", "not to have same value or type as 1"]
+ expect(matcher.negative_failure_message).to eq(["Expected 1.0", "not to have same value or type as 1"])
end
end