File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 44
44
supports_block_expectations
45
45
end
46
46
47
- precision = Sass ::Value . const_get ( :FuzzyMath ) ::PRECISION + 1
47
+ epsilon = Sass ::Value . const_get ( :FuzzyMath ) ::EPSILON
48
48
49
49
RSpec ::Matchers . matcher :fuzzy_eq do |expected |
50
50
match do |actual |
57
57
expect ( actual . alpha ) . to fuzzy_eq ( expected . alpha )
58
58
expect ( actual ) . to eq ( expected )
59
59
when Numeric
60
- expect ( actual ) . to be_within ( 10 **- precision ) . of ( expected )
60
+ expect ( actual ) . to be_within ( epsilon ) . of ( expected )
61
61
else
62
62
expect ( actual ) . to eq ( expected )
63
63
end
68
68
match do |actual |
69
69
expect ( actual ) . to match_array ( expected . map do |obj |
70
70
if obj . is_a? ( Numeric )
71
- a_value_within ( 10 **- precision ) . of ( obj )
71
+ a_value_within ( epsilon ) . of ( obj )
72
72
else
73
73
obj
74
74
end
You can’t perform that action at this time.
0 commit comments