summaryrefslogtreecommitdiff
path: root/spec/mspec/spec/matchers/be_close_spec.rb
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 11:37:19 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-27 11:37:19 +0000
commit80fdfbf8099d8e802b9faaef2eda1ffdb787d1ce (patch)
treeabe4d154d7577229a0b0eb48d358ae6d542cf7e3 /spec/mspec/spec/matchers/be_close_spec.rb
parentcbbe2fab8255223f2898489365b16a72d2c02946 (diff)
Update to ruby/mspec@7074b56
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/mspec/spec/matchers/be_close_spec.rb')
-rw-r--r--spec/mspec/spec/matchers/be_close_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/mspec/spec/matchers/be_close_spec.rb b/spec/mspec/spec/matchers/be_close_spec.rb
index 9b6e56e6d5..6edff98e4a 100644
--- a/spec/mspec/spec/matchers/be_close_spec.rb
+++ b/spec/mspec/spec/matchers/be_close_spec.rb
@@ -16,12 +16,14 @@ describe BeCloseMatcher do
BeCloseMatcher.new(5.0, 0.5).matches?(4.51).should == true
end
- it "does not match when actual == (expected + tolerance)" do
- BeCloseMatcher.new(5.0, 0.5).matches?(5.5).should == false
+ it "matches when actual == (expected + tolerance)" do
+ BeCloseMatcher.new(5.0, 0.5).matches?(5.5).should == true
+ BeCloseMatcher.new(3, 2).matches?(5).should == true
end
- it "does not match when actual == (expected - tolerance)" do
- BeCloseMatcher.new(5.0, 0.5).matches?(4.5).should == false
+ it "matches when actual == (expected - tolerance)" do
+ BeCloseMatcher.new(5.0, 0.5).matches?(4.5).should == true
+ BeCloseMatcher.new(3, 2).matches?(1).should == true
end
it "does not match when actual < (expected - tolerance)" do