Skip to content

Commit 6c11f60

Browse files
committed
Update spec_helper.rb
1 parent c4c8ea7 commit 6c11f60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/spec_helper.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
supports_block_expectations
4545
end
4646

47-
precision = Sass::Value.const_get(:FuzzyMath)::PRECISION + 1
47+
epsilon = Sass::Value.const_get(:FuzzyMath)::EPSILON
4848

4949
RSpec::Matchers.matcher :fuzzy_eq do |expected|
5050
match do |actual|
@@ -57,7 +57,7 @@
5757
expect(actual.alpha).to fuzzy_eq(expected.alpha)
5858
expect(actual).to eq(expected)
5959
when Numeric
60-
expect(actual).to be_within(10**-precision).of(expected)
60+
expect(actual).to be_within(epsilon).of(expected)
6161
else
6262
expect(actual).to eq(expected)
6363
end
@@ -68,7 +68,7 @@
6868
match do |actual|
6969
expect(actual).to match_array(expected.map do |obj|
7070
if obj.is_a?(Numeric)
71-
a_value_within(10**-precision).of(obj)
71+
a_value_within(epsilon).of(obj)
7272
else
7373
obj
7474
end

0 commit comments

Comments
 (0)