From ac484315cc52f13bb1652f2d3cd0416d626a4266 Mon Sep 17 00:00:00 2001 From: Wout Schellaert Date: Thu, 13 Dec 2018 20:59:52 +0100 Subject: [PATCH] Fix floating point difference with Travis --- spec/models/user_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 49acf8a..5750ca7 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -157,7 +157,8 @@ describe User do end @user.reload num_orders = Rails.application.config.frecency_num_orders - expect(@user.frecency).to eq(10025915) + # On Travis the result is 10025938 cause floating points + expect(@user.frecency).to be_within(50).of(10025915) end end end