-
Notifications
You must be signed in to change notification settings - Fork 3
Troubleshooting
Ngan Pham edited this page Apr 7, 2026
·
4 revisions
Error:
FixtureKit::CacheMissingError
Meaning: cache file was not generated before mount.
Checks:
- Fixture was declared in that context/class.
- Framework entrypoint is required (
fixture_kit/rspecorfixture_kit/minitest). - Cache path is writable.
Error:
FixtureKit::FixtureDefinitionNotFound
Checks:
- File exists at
<fixture_path>/<name>.rb. - File returns
FixtureKit.define { ... }.
Error:
FixtureKit::MultipleFixtures
Meaning: same context/class declared fixture more than once.
Fix: keep one declaration per context/class; use nested scope/class override instead.
Error:
FixtureKit::InvalidFixtureDeclaration
Checks:
- Provide exactly one of name or block.
Error:
FixtureKit::RunnerAlreadyStartedError
Meaning: internal startup invoked more than once in same runner instance.
Fix: avoid manually calling FixtureKit.runner.start in tests that already use entrypoints.
Use temporary logging:
FixtureKit.configure do |config|
config.on_cache_save { |fixture| puts "save: #{fixture.identifier} (#{fixture.path})" }
config.on_cache_saved { |fixture, duration| puts "saved: #{fixture.identifier} in #{duration}" }
config.on_cache_mount { |fixture| puts "mount: #{fixture.identifier}" }
config.on_cache_mounted { |fixture, duration| puts "mounted: #{fixture.identifier} in #{duration}" }
end