dont use cover?() in test, to support ruby 1.8
This commit is contained in:
parent
38ba10ddad
commit
599b96ed95
@ -240,7 +240,7 @@ When /^I route I should get$/ do |table|
|
||||
margin = 1 - $2.to_f*0.01
|
||||
from = $1.to_f*margin
|
||||
to = $1.to_f/margin
|
||||
if (from..to).cover? got[key].to_f
|
||||
if got[key].to_f >= from && got[key].to_f <= to
|
||||
got[key] = row[key]
|
||||
else
|
||||
ok = false
|
||||
@ -249,7 +249,7 @@ When /^I route I should get$/ do |table|
|
||||
margin = $2.to_f
|
||||
from = $1.to_f-margin
|
||||
to = $1.to_f+margin
|
||||
if (from..to).cover? got[key].to_f
|
||||
if got[key].to_f >= from && got[key].to_f <= to
|
||||
got[key] = row[key]
|
||||
else
|
||||
ok = false
|
||||
|
Loading…
Reference in New Issue
Block a user