Skip to content

Fix failing rspec test by reading coverage data from coverage_data.js#347

Open
connorshea wants to merge 1 commit into
KnapsackPro:mainfrom
connorshea:fix-simplecov-coverage-test
Open

Fix failing rspec test by reading coverage data from coverage_data.js#347
connorshea wants to merge 1 commit into
KnapsackPro:mainfrom
connorshea:fix-simplecov-coverage-test

Conversation

@connorshea

Copy link
Copy Markdown

Description

AI Disclosure: Had Claude investigate and fix the problem, verified it myself for correctness.

Fix the test failure caused by the simplecov version upgrade.

SimpleCov 1.0 rewrote its HTML formatter: index.html is now static and loads a client-side viewer, and the report data lives in coverage_data.js. So we want to check that file instead.

This is a test change so I don't think it makes sense to update the CHANGELOG?

Checks

  • I added the changes to the UNRELEASED section of the CHANGELOG.md, including the needed bump (i.e., patch, minor, major)
  • I followed the architecture outlined below for RSpec in Queue Mode:
    • Pure: lib/knapsack_pro/pure/queue/rspec_pure.rb contains pure functions that are unit tested.
    • Extension: lib/knapsack_pro/extensions/rspec_extension.rb encapsulates calls to RSpec internals and is integration and E2E tested.
    • Runner: lib/knapsack_pro/runners/queue/rspec_runner.rb invokes the pure code and the extension to produce side effects, which are integration and E2E tested.

SimpleCov 1.0 rewrote its HTML formatter: index.html is now a static
shell that loads a client-side viewer, and the report data lives in
coverage_data.js. Point the integration test at that file so the
assertions on the covered spec file paths match again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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