I have a specification for a method that returns the timestamp of an ActiveRecord object.
The spectrum runs locally, but whenever it runs in CircleCI, there is a slight discrepancy between the expected and the actual.
The specification looks something like this:
describe '#my_method' do it 'returns created_at' do object = FactoryGirl.create(:something) expect(foo.bar(object)).to eq object.created_at end end
While it runs locally, at CircleCI I constantly get similar error messages.
Here are some examples:
(one)
expected: 2015-05-09 10:42:59.752192641 +0000 got: 2015-05-09 10:42:59.752192000 +0000
(2)
expected: 2015-05-08 10:16:36.777541226 +0000 got: 2015-05-08 10:16:36.777541000 +0000
Due to an error, I suspect that CircleCI rounds the timestamp value, but I don't have enough information. Any suggestions?
ruby-on-rails rspec circleci
Sung wonder cho
source share