From 610cd8fce4c54e0b24458dfcf6095a68220e2f00 Mon Sep 17 00:00:00 2001 From: wvengen Date: Sun, 18 Jan 2015 02:06:16 +0100 Subject: [PATCH] Test rounded at cents --- spec/models/article_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/article_spec.rb b/spec/models/article_spec.rb index 9ef04b1d..d5b758bc 100644 --- a/spec/models/article_spec.rb +++ b/spec/models/article_spec.rb @@ -103,7 +103,7 @@ describe Article do article.update_attributes! updated_article.attributes.reject{|k,v| k=='id' or k=='type'} expect(article.unit).to eq '200g' expect(article.unit_quantity).to eq 5 - expect(article.price).to be_within(1e-3).of(shared_article.price/5) + expect(article.price).to be_within(0.005).of(shared_article.price/5) end it 'does not synchronise when it has no order number' do