Skip to content

Add 100% test coverage with SimpleCov#214

Open
teoljungberg wants to merge 3 commits into
masterfrom
test-coverage
Open

Add 100% test coverage with SimpleCov#214
teoljungberg wants to merge 3 commits into
masterfrom
test-coverage

Conversation

@teoljungberg

Copy link
Copy Markdown
Owner
  • Configure SimpleCov with a 100% minimum coverage gate.
  • Wire COVERAGE=true into the CI workflow so coverage is enforced on
    every matrix combination.
  • Remove dead code uncovered by this effort:
    • Arguments#version
    • updating_existing_function? / creating_new_function?
    • updating_existing_trigger?
  • Add missing tests for the Fx::Generators namespace module
  • Add missing test for resolve_sql_definition error path for invalid
    types.

@teoljungberg teoljungberg force-pushed the test-coverage branch 2 times, most recently from 0bcc101 to b0d81b6 Compare May 15, 2026 08:36
- Configure SimpleCov in spec_helper.rb with a 100% minimum_coverage
  gate. Uses SIMPLECOV_COMMAND_NAME to merge results across runs.
- Wire COVERAGE=true into CI. Splits the suite into three steps:
  unit tests, acceptance tests, and linting. Coverage merges across
  both test runs.
- Remove dead code uncovered by this effort:
  - Arguments#version (private, never called)
  - updating_existing_function? / creating_new_function? (private,
    never called)
  - updating_existing_trigger? (private, never called)
- Add missing tests for the Fx::Generators namespace module and the
  resolve_sql_definition error path for invalid types.
This reuses the existing spec and spec:acceptance rake tasks rather
than invoking rspec directly. SimpleCov merges results across both
runs because each uses a distinct SIMPLECOV_COMMAND_NAME.
The method was defined in lib/generators/fx/name_helper.rb but never
called by any generator -- only by its own spec. Its callers are
covered by `format_for_migration` and `format_table_name_from_hash`,
both of which remain. Drops three test-only examples along with the
method.
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