Skip to content

style: Fix RSpec structural offenses - #2742

Merged
mroderick merged 9 commits into
masterfrom
fix/rubocop-rspec-structural
Jul 28, 2026
Merged

style: Fix RSpec structural offenses#2742
mroderick merged 9 commits into
masterfrom
fix/rubocop-rspec-structural

Conversation

@mroderick

Copy link
Copy Markdown
Collaborator

This PR fixes the RSpec structural cops.

Eight commits:

  1. style: Fix RSpec/EmptyLineAfterHook offenses — 6 offenses in 3 files
  2. style: Fix RSpec/EmptyLineAfterSubject offenses — 4 offenses in 4 files
  3. style: Fix RSpec/EmptyLineAfterFinalLet offenses — 2 offenses in 2 files
  4. style: Fix RSpec/ExpectInHook offenses — 2 offenses, manually fixed (moved expectations out of hooks)
  5. style: Fix RSpec/HooksBeforeExamples offense — 1 offense
  6. style: Fix RSpec/EmptyLineAfterExampleGroup offense — 1 offense
  7. style: Fix RSpec/NoExpectationExample offenses — 2 offenses, manually fixed (added response assertion)
  8. style: Fix RSpec/EmptyExampleGroup offense — removed empty spec file

Each commit removes the relevant exclusion from .rubocop_todo.yml and regenerates it.

  • Offense count: 1916 → 1835
  • bundle exec rubocop is green
  • Affected specs pass (187 examples, 0 failures)

mroderick and others added 9 commits July 28, 2026 08:40
Fix RSpec/EmptyLineAfterHook offenses in:
- spec/controllers/admin/member_search_controller_spec.rb
- spec/models/workshop_invitation_spec.rb
- spec/models/workshop_spec.rb

Regenerate .rubocop_todo.yml.
Fix RSpec/EmptyLineAfterSubject offenses in:
- spec/models/event_spec.rb
- spec/models/meeting_spec.rb
- spec/models/workshop_invitation_spec.rb
- spec/models/workshop_spec.rb

Regenerate .rubocop_todo.yml.
Fix RSpec/EmptyLineAfterFinalLet offenses in:
- spec/lib/tasks/delete_member_rake_spec.rb
- spec/models/sponsor_spec.rb

Regenerate .rubocop_todo.yml.
Fix RSpec/ExpectInHook offenses by moving expectations out of before and
after hooks into the relevant example bodies:
- spec/controllers/admin/invitations_controller_spec.rb
- spec/support/shared_examples/behaves_like_managing_workshop_attendance.rb

Regenerate .rubocop_todo.yml.
Fix RSpec/HooksBeforeExamples offense in
spec/support/shared_examples/behaves_like_managing_workshop_attendance.rb
and regenerate .rubocop_todo.yml.
Fix RSpec/EmptyLineAfterExampleGroup offense in
spec/features/admin/manage_sponsor_spec.rb and regenerate
.rubocop_todo.yml.
Fix RSpec/NoExpectationExample offenses in spec/lib/services/flodesk_spec.rb
by asserting the response of subscribe/unsubscribe, and regenerate
.rubocop_todo.yml.
Remove the empty spec/models/address_spec.rb and regenerate
.rubocop_todo.yml.
@mroderick
mroderick marked this pull request as ready for review July 28, 2026 06:54
@mroderick
mroderick merged commit 739213f into master Jul 28, 2026
9 checks passed
@mroderick
mroderick deleted the fix/rubocop-rspec-structural branch July 28, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant