Browse Source

Ignore rubocop RSpec/AnyInstance when necessary

pull/2695/head
Rachael Booth 2 years ago
parent
commit
fdfac0402a
  1. 2
      spec/models/forms/bulk_upload_lettings/guidance_spec.rb
  2. 2
      spec/models/forms/bulk_upload_sales/guidance_spec.rb

2
spec/models/forms/bulk_upload_lettings/guidance_spec.rb

@ -47,7 +47,9 @@ RSpec.describe Forms::BulkUploadLettings::Guidance do
let(:year) { nil }
before do
# rubocop:disable RSpec/AnyInstance
allow_any_instance_of(CollectionTimeHelper).to receive(:current_collection_start_year).and_return(2030)
# rubocop:enable RSpec/AnyInstance
end
it "is set to the current collection start year" do

2
spec/models/forms/bulk_upload_sales/guidance_spec.rb

@ -47,7 +47,9 @@ RSpec.describe Forms::BulkUploadSales::Guidance do
let(:year) { nil }
before do
# rubocop:disable RSpec/AnyInstance
allow_any_instance_of(CollectionTimeHelper).to receive(:current_collection_start_year).and_return(2030)
# rubocop:enable RSpec/AnyInstance
end
it "is set to the current collection start year" do

Loading…
Cancel
Save