Skip to content

Commit db9f5bd

Browse files
pftgclaude
andcommitted
fix: reset fail_if_new in test setup for CI compatibility
Tests create new screenshots without baselines, so fail_if_new must be false during test runs. The new CI-aware default (ENV['CI']) would otherwise break all tests that capture new screenshots. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9570adf commit db9f5bd

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

test/test_helper.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ class ActiveSupport::TestCase
3939
# Set up fixtures and test helpers
4040
self.file_fixture_path = Pathname.new(File.expand_path("fixtures", __dir__))
4141

42+
setup do
43+
# Tests create new screenshots — don't fail on missing baselines
44+
Capybara::Screenshot::Diff.fail_if_new = false
45+
end
46+
4247
teardown do
4348
CapybaraScreenshotDiff::SnapManager.cleanup! unless persist_comparisons?
4449
end

0 commit comments

Comments
 (0)