Skip to content

Commit bae67fe

Browse files
justin808claude
andcommitted
Fix RSpec examples.txt persistence file path configuration
The spec_helper.rb was using a relative path "spec/examples.txt" which created the file relative to the current working directory. When tests were run from the monorepo root, this created a spec/ directory at the root level (which shouldn't exist with the new structure). Fixed by using File.join(__dir__, "../examples.txt") to create the file relative to the spec_helper's location, ensuring it goes in react_on_rails/spec/examples.txt regardless of the working directory. Also added /spec/ to .gitignore to prevent the root-level directory from being tracked if accidentally created. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e835e09 commit bae67fe

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ coverage/
99
*.gem
1010
/vendor/
1111

12+
# Root-level spec directory (should not exist with monorepo structure)
13+
/spec/
14+
1215
react_on_rails/spec/examples.txt
1316
react_on_rails/spec/react_on_rails/dummy-for-generators/
1417
react_on_rails_pro/spec/examples.txt

react_on_rails/spec/react_on_rails/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
RSpec.configure do |config|
4646
Rails.logger = Logger.new($stdout)
4747

48-
config.example_status_persistence_file_path = "spec/examples.txt"
48+
config.example_status_persistence_file_path = File.join(__dir__, "../examples.txt")
4949
config.run_all_when_everything_filtered = true
5050

5151
# rspec-expectations config goes here. You can use an alternate

0 commit comments

Comments
 (0)