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 4444 supports_block_expectations
4545end
4646
47- precision = Sass ::Value . const_get ( :FuzzyMath ) ::PRECISION + 1
47+ epsilon = Sass ::Value . const_get ( :FuzzyMath ) ::EPSILON
4848
4949RSpec ::Matchers . matcher :fuzzy_eq do |expected |
5050 match do |actual |
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
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
You can’t perform that action at this time.
0 commit comments