diff --git a/spec/interactors/problem_updater_cache_spec.rb b/spec/interactors/problem_updater_cache_spec.rb index ff6f743..5a7a66f 100644 --- a/spec/interactors/problem_updater_cache_spec.rb +++ b/spec/interactors/problem_updater_cache_spec.rb @@ -74,7 +74,7 @@ describe ProblemUpdaterCache do end it 'update first_notice_at' do - expect(problem.first_notice_at.to_time).to eq notice.created_at.to_time + expect(problem.first_notice_at.to_i).to be_within(1).of(notice.created_at.to_i) end it 'update last_notice_at' do diff --git a/spec/models/problem_spec.rb b/spec/models/problem_spec.rb index a39a64f..71005a2 100644 --- a/spec/models/problem_spec.rb +++ b/spec/models/problem_spec.rb @@ -57,10 +57,10 @@ describe Problem do problem.should_not be_nil notice1 = Fabricate(:notice, :err => err) - problem.first_notice_at.should == notice1.created_at + expect(problem.first_notice_at.to_i).to be_within(1).of(notice.created_at.to_i) notice2 = Fabricate(:notice, :err => err) - problem.first_notice_at.to_time.should eq notice1.created_at + expect(problem.first_notice_at.to_i).to be_within(1).of(notice.created_at.to_i) end end -- libgit2 0.21.2