We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e8d7df commit 2cabe68Copy full SHA for 2cabe68
spec/rspec/rails/matchers/active_job_spec.rb
@@ -223,6 +223,14 @@ def self.name; "LoggingJob"; end
223
}.to have_enqueued_job.at(time)
224
end
225
226
+ it "works with time offsets", skip: !defined?(ActiveSupport::Testing::TimeHelpers) do
227
+ class_eval { include ActiveSupport::Testing::TimeHelpers }
228
+ freeze_time do
229
+ time = Time.current
230
+ expect { hello_job.set(wait: 5).perform_later }.to have_enqueued_job.at(time + 5)
231
+ end
232
233
+
234
it "accepts composable matchers as an at date" do
235
future = 1.minute.from_now
236
slightly_earlier = 58.seconds.from_now
0 commit comments