Skip to content

Make learning hours report spec Standard-compliant (#7265) - #7271

Merged
compwron merged 2 commits into
rubyforgood:mainfrom
KoushikSagarr:standard-compliance-learning-hours-report-spec
Oct 30, 2026
Merged

compwron merged 2 commits into
rubyforgood:mainfrom
KoushikSagarr:standard-compliance-learning-hours-report-spec

Conversation

@KoushikSagarr

Copy link
Copy Markdown
Contributor

What github issue is this PR for, if any?

Related to #7265

What changed, and why?

This PR brings spec/models/learning_hours_report_spec.rb into StandardRB compliance as part of the repository's ongoing gradual StandardRB migration.

Previously, this spec was excluded from linting through .standard_todo.yml due to a Layout/EmptyLineAfterGuardClause offense.

The following changes were made:

  • Removed spec/models/learning_hours_report_spec.rb and its associated offense from .standard_todo.yml.
  • Added the required blank line after the guard clause (next if index.zero?) inside the each_with_index block.
  • Kept the changes strictly limited to formatting, with no modifications to existing test logic or application behavior.

This allows the spec to be checked directly by StandardRB instead of remaining in the migration exclusion list.

How is this tested? (please write rspec and jest tests!) 💖💪

The following checks were executed using the project's Docker Compose environment:

  • StandardRB: docker compose run --rm web bundle exec standardrb spec/models/learning_hours_report_spec.rb

    • Passed with no offenses reported.
    • Confirmed the spec is no longer excluded by .standard_todo.yml.
  • RSpec: docker compose run --rm web bundle exec rspec spec/models/learning_hours_report_spec.rb

    • Passed: 2 examples, 0 failures.
  • Diff validation: git diff --check

    • Passed with no whitespace errors.

No new tests were necessary because this change only addresses formatting and does not alter existing behavior.

Screenshots please :)

Not applicable. This is a Ruby spec formatting and lint-configuration change with no UI modifications.

@compwron compwron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

@compwron
compwron merged commit 8f7cabf into rubyforgood:main Oct 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Touches Ruby code 🧪 Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants