Skip to content

Commit 7ecda54

Browse files
committed
bug demo
1 parent 4a1d800 commit 7ecda54

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/rspec/rails/matchers/active_job_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ def self.name; "LoggingJob"; end
9494
}.to have_enqueued_job.exactly(1)
9595
end
9696

97+
it "counts jobs even when others are removed" do
98+
heavy_lifting_job.perform_later
99+
expect {
100+
perform_enqueued_jobs
101+
hello_job.perform_later
102+
}.to have_enqueued_job(hello_job)
103+
end
104+
97105
it "passes when negated" do
98106
expect { }.not_to have_enqueued_job
99107
end

0 commit comments

Comments
 (0)