From 2589be889922eeb606a724cebde968f714cb9d8d Mon Sep 17 00:00:00 2001 From: Moncef Belyamani Date: Sat, 25 Apr 2015 21:52:42 -0400 Subject: [PATCH] Fix flickering spec. --- spec/requests/status_spec.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spec/requests/status_spec.rb b/spec/requests/status_spec.rb index 9e22ccf91..7654a82e7 100644 --- a/spec/requests/status_spec.rb +++ b/spec/requests/status_spec.rb @@ -19,8 +19,9 @@ expect(json['status']).to eq('ok') end - it "returns 'updated' attribute set to current time" do - expect(json['updated']).to eq(Time.zone.now.to_i) + it "returns 'updated' attribute set to current time as integer" do + expect(json['updated'].is_a?(Integer)).to eq true + expect(json['updated'].to_s.length).to eq 10 end end @@ -41,8 +42,9 @@ expect(json['dependencies']).to eq(%w(Mandrill Postgres)) end - it "returns 'updated' attribute set to current time" do - expect(json['updated']).to eq(Time.zone.now.to_i) + it "returns 'updated' attribute set to current time as integer" do + expect(json['updated'].is_a?(Integer)).to eq true + expect(json['updated'].to_s.length).to eq 10 end end end