Add 100% test coverage with SimpleCov#214
Open
teoljungberg wants to merge 3 commits into
Open
Conversation
0bcc101 to
b0d81b6
Compare
- 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.
07ea4f9 to
a8f264e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
every matrix combination.
Arguments#versionupdating_existing_function?/creating_new_function?updating_existing_trigger?Fx::Generatorsnamespace moduleresolve_sql_definitionerror path for invalidtypes.