Skip to content

Commit

Permalink
Remove implicit rails_helper require (#4529)
Browse files Browse the repository at this point in the history
  • Loading branch information
awwaiid authored Jul 16, 2024
1 parent f747006 commit 6e72b95
Show file tree
Hide file tree
Showing 104 changed files with 0 additions and 192 deletions.
1 change: 0 additions & 1 deletion spec/controllers/admins_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
=begin
require "rails_helper"
RSpec.describe AdminsController, type: :controller do
let(:organization) { create(:organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/controllers/help_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe HelpController, type: :controller do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/helpers/application_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe ApplicationHelper, type: :helper do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/helpers/product_drive_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe ProductDriveHelper, type: :helper do
describe '#is_virtual' do
context 'when the product drive was held virtually' do
Expand Down
2 changes: 0 additions & 2 deletions spec/helpers/purchases_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe PurchasesHelper, type: :helper do
describe "#new_purchase_default_location" do
helper do
Expand Down
2 changes: 0 additions & 2 deletions spec/helpers/ui_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe UiHelper, type: :helper do
describe 'optional_data_text' do
subject { helper.optional_data_text(field) }
Expand Down
2 changes: 0 additions & 2 deletions spec/jobs/historical_data_cache_job_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe HistoricalDataCacheJob, type: :job do
include ActiveJob::TestHelper

Expand Down
2 changes: 0 additions & 2 deletions spec/jobs/reminder_deadline_job_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe ReminderDeadlineJob, type: :job do
describe '#perform' do
subject { -> { described_class.perform_now } }
Expand Down
1 change: 0 additions & 1 deletion spec/models/account_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
# updated_at :datetime not null
# ndbn_member_id :bigint
#
require 'rails_helper'

RSpec.describe AccountRequest, type: :model do
let(:account_request) { create(:account_request) }
Expand Down
2 changes: 0 additions & 2 deletions spec/models/audit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# user_id :bigint
#

require 'rails_helper'

RSpec.describe Audit, type: :model do
let(:organization) { create(:organization) }

Expand Down
2 changes: 0 additions & 2 deletions spec/models/base_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# updated_at :datetime not null
#

require "rails_helper"

RSpec.describe BaseItem, type: :model do
let(:organization) { create(:organization) }

Expand Down
1 change: 0 additions & 1 deletion spec/models/broadcast_announcement_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# organization_id :bigint
# user_id :bigint not null
#
require "rails_helper"

RSpec.describe BroadcastAnnouncement, type: :model do
it { should belong_to(:organization).optional }
Expand Down
2 changes: 0 additions & 2 deletions spec/models/concerns/deadlinable_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe Deadlinable, type: :model do
let(:dummy_class) do
Class.new do
Expand Down
1 change: 0 additions & 1 deletion spec/models/county_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# created_at :datetime not null
# updated_at :datetime not null
#
require "rails_helper"

RSpec.describe County, type: :model do
it { should have_many(:served_areas) }
Expand Down
1 change: 0 additions & 1 deletion spec/models/item_category_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# updated_at :datetime not null
# organization_id :integer not null
#
require 'rails_helper'

RSpec.describe ItemCategory, type: :model do
describe 'validations' do
Expand Down
1 change: 0 additions & 1 deletion spec/models/kit_allocation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# organization_id :bigint not null
# storage_location_id :bigint not null
#
require "rails_helper"

RSpec.describe KitAllocation, type: :model do
describe "versioning" do
Expand Down
1 change: 0 additions & 1 deletion spec/models/kit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# updated_at :datetime not null
# organization_id :integer not null
#
require 'rails_helper'

RSpec.describe Kit, type: :model do
let(:organization) { create(:organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/models/manufacturer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
# organization_id :bigint
#

require "rails_helper"

RSpec.describe Manufacturer, type: :model do
context "Validations" do
subject { build(:manufacturer) }
Expand Down
1 change: 0 additions & 1 deletion spec/models/ndbn_member_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# updated_at :datetime not null
# ndbn_member_id :bigint not null, primary key
#
require "rails_helper"

RSpec.describe NDBNMember, type: :model do
describe "validations" do
Expand Down
1 change: 0 additions & 1 deletion spec/models/partners/authorized_family_member_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# updated_at :datetime not null
# family_id :bigint
#
require "rails_helper"

RSpec.describe Partners::AuthorizedFamilyMember, type: :model do
describe 'associations' do
Expand Down
1 change: 0 additions & 1 deletion spec/models/partners/child_item_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# child_id :bigint
# item_request_id :bigint
#
require 'rails_helper'

RSpec.describe Partners::ChildItemRequest, type: :model do
describe 'associations' do
Expand Down
1 change: 0 additions & 1 deletion spec/models/partners/child_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# agency_child_id :string
# family_id :bigint
#
require "rails_helper"

RSpec.describe Partners::Child, type: :model do
describe 'associations' do
Expand Down
2 changes: 0 additions & 2 deletions spec/models/partners/family_request_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe Partners::FamilyRequest do
describe "Partners::FamilyRequest.new_with_attrs" do
it "creates a new FamilyRequest with attributes" do
Expand Down
2 changes: 0 additions & 2 deletions spec/models/partners/family_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
# partner_id :bigint
#

require "rails_helper"

RSpec.describe Partners::Family, type: :model do
describe "associations" do
it { should belong_to(:partner) }
Expand Down
1 change: 0 additions & 1 deletion spec/models/partners/item_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# old_partner_request_id :integer
# partner_request_id :bigint
#
require "rails_helper"

RSpec.describe Partners::ItemRequest, type: :model do
let(:organization) { create(:organization) }
Expand Down
1 change: 0 additions & 1 deletion spec/models/partners/profile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@
# essentials_bank_id :bigint
# partner_id :integer
#
require "rails_helper"

RSpec.describe Partners::Profile, type: :model do
describe "associations" do
Expand Down
1 change: 0 additions & 1 deletion spec/models/partners/served_area_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# county_id :bigint not null
# partner_profile_id :bigint not null
#
require "rails_helper"

RSpec.describe Partners::ServedArea, type: :model do
it { should belong_to(:partner_profile) }
Expand Down
2 changes: 0 additions & 2 deletions spec/models/product_drive_participant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
# organization_id :integer
#

require "rails_helper"

RSpec.describe ProductDriveParticipant, type: :model do
it_behaves_like "provideable"

Expand Down
2 changes: 0 additions & 2 deletions spec/models/product_drive_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# organization_id :bigint
#

require "rails_helper"

RSpec.describe ProductDrive, type: :model do
let(:organization) { create(:organization) }
let(:product_drive) { create(:product_drive, organization: organization) }
Expand Down
1 change: 0 additions & 1 deletion spec/models/question_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# created_at :datetime not null
# updated_at :datetime not null
#
require "rails_helper"

RSpec.describe Question, type: :model do
describe "scope for_partners" do
Expand Down
1 change: 0 additions & 1 deletion spec/models/role_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# old_resource_id :bigint
# resource_id :bigint
#
require "rails_helper"

RSpec.describe Role, type: :model do
describe "Validations" do
Expand Down
2 changes: 0 additions & 2 deletions spec/models/vendor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
# organization_id :integer
#

require "rails_helper"

RSpec.describe Vendor, type: :model do
it_behaves_like "provideable"

Expand Down
2 changes: 0 additions & 2 deletions spec/requests/account_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe "/account_requests", type: :request do
describe "GET #new" do
it "renders a successful response" do
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/adjustments_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "Adjustments", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/account_requests_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe 'Admin::AccountRequestsController', type: :request do
let(:organization) { create(:organization) }

Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/barcode_items_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe 'Admin::BarcodeItemsController', type: :request do
let(:organization) { create(:organization) }

Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/base_items_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe "Admin::BaseItems", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/broadcast_announcements_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "BroadcastAnnouncements", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:super_admin, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/ndbn_members_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "NDBNMembers", type: :request do
let(:user) { create(:super_admin) }

Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/partners_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe "Admin::Partners", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/questions_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "Admin::Questions", type: :request do
context "while signed in as a super admin" do
before do
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/admin/users_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe "Admin::UsersController", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/audits_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe "Audits", type: :request do
let(:organization) { create(:organization) }
let(:organization_admin) { create(:organization_admin, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/broadcast_announcements_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "BroadcastAnnouncements", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/dashboard_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe "Dashboard", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/distributions_by_county_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "DistributionsByCounties", type: :request do
include_examples "distribution_by_county"

Expand Down
2 changes: 0 additions & 2 deletions spec/requests/distributions_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'rails_helper'

RSpec.describe "Distributions", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/donation_sites_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "DonationSites", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/donations_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "Donations", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/events_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "Events", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:organization_admin, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/item_categories_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "ItemCategories", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/items_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "Items", type: :request do
let(:organization) { create(:organization, short_name: "my_org") }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/kit_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "/kits", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/organization_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "Organizations", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/partner_users_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# spec/requests/partner_users_controller_spec.rb

require "rails_helper"

RSpec.describe PartnerUsersController, type: :request do
let!(:partner) { create(:partner) } # Assuming you have a factory for creating partners
let!(:user) { create(:user) } # Assuming you have a factory for creating users
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/partners/children_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "/partners/children", type: :request do
let(:partner_user) { partner.primary_user }
let(:partner) { create(:partner) }
Expand Down
2 changes: 0 additions & 2 deletions spec/requests/partners/dashboard_requests_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "rails_helper"

RSpec.describe "/partners/dashboard", type: :request do
let(:organization) { create(:organization) }
let(:user) { create(:user, organization: organization) }
Expand Down
Loading

0 comments on commit 6e72b95

Please sign in to comment.