spec/mongo/collection_spec.rb in mongo-2.18.3 vs spec/mongo/collection_spec.rb in mongo-2.19.0
- old
+ new
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-# encoding: utf-8
+# rubocop:todo all
require 'spec_helper'
describe Mongo::Collection do
@@ -832,12 +832,12 @@
end
enum.next
end
it "waits the appropriate amount of time" do
- start_time = Time.now
+ start_time = Mongo::Utils.monotonic_time
enum.try_next
- end_time = Time.now
+ end_time = Mongo::Utils.monotonic_time
expect(end_time-start_time).to be >= 3
end
end
end