Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
require:
- rubocop-capybara
- rubocop-factory_bot

plugins:
- rubocop-capybara
- rubocop-rspec
- rubocop-rspec_rails

Expand Down
2 changes: 1 addition & 1 deletion spec/system/static/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
context "when visiting the CASA volunteer landing page", :js do
describe "when all organizations have logos" do
before do
3.times { create(:casa_org, :with_logo, display_name: "CASA of Awesome") }
create_list(:casa_org, 3, :with_logo, display_name: "CASA of Awesome")
visit root_path
end

Expand Down
16 changes: 2 additions & 14 deletions spec/system/volunteers/index_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,7 @@
# These tests are very flaky do to the use of datatables on this page.
# If the page is switched over to Hotwire, should try to re-instate these tests.
describe "Manage Volunteers button" do
let!(:volunteers) {
[
create(:volunteer, casa_org: organization),
create(:volunteer, casa_org: organization),
create(:volunteer, casa_org: organization)
]
}
let!(:volunteers) { create_list(:volunteer, 3, casa_org: organization) }

before do
sign_in admin
Expand Down Expand Up @@ -229,13 +223,7 @@
end

describe "Select All Checkbox" do
let!(:volunteers) {
[
create(:volunteer, casa_org: organization),
create(:volunteer, casa_org: organization),
create(:volunteer, casa_org: organization)
]
}
let!(:volunteers) { create_list(:volunteer, 3, casa_org: organization) }

before do
sign_in admin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

RSpec.describe "patch_notes/index", type: :view do
let(:all_casa_admin) { build(:all_casa_admin) }
let!(:patch_notes) {
[
create(:patch_note),
create(:patch_note)
]
}
let!(:patch_notes) { create_list(:patch_note, 2) }

before do
assign(:patch_notes, patch_notes)
Expand Down