Commit c679d184 authored by Peter Leitzen's avatar Peter Leitzen

Fix order dependent cleanup package file worker spec

Prefer `before_all` instead of `before(:context)`.
parent 208fb01e
......@@ -101,12 +101,12 @@ RSpec.describe Packages::CleanupPackageFileWorker do
end
describe '#remaining_work_count' do
before(:context) do
create_list(:package_file, 3, :pending_destruction, package: package)
before_all do
create_list(:package_file, 2, :pending_destruction, package: package)
end
subject { worker.remaining_work_count }
it { is_expected.to eq(3) }
it { is_expected.to eq(2) }
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment