spec/unit/modules/conversions_spec.rb in ably-0.1.5 vs spec/unit/modules/conversions_spec.rb in ably-0.1.6
- old
+ new
@@ -47,10 +47,10 @@
context 'with numeric' do
let(:millisecond) { Time.new.to_f * 1_000 }
let(:seconds) { Time.new.to_f }
it 'converts to Time from milliseconds by default' do
- expect(subject.as_time_from_epoch(millisecond).to_f).to be_within(0.001).of(time.to_f)
+ expect(subject.as_time_from_epoch(millisecond).to_f).to be_within(0.01).of(time.to_f)
end
it 'converts to Time from seconds' do
expect(subject.as_time_from_epoch(seconds, granularity: :s).to_i).to eql(time.to_i)
end