Skip to content

Commit 30e0e6d

Browse files
justin808claude
andcommitted
Fix mock objects in packer_utils_spec
Use double() instead of instance_double() with class constants that may not be loaded in test environment. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 7fdc7b4 commit 30e0e6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/react_on_rails/packer_utils_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ module ReactOnRails
9292
end
9393

9494
describe ".supports_auto_registration?" do
95-
let(:mock_config) { instance_double(Shakapacker::Config) }
96-
let(:mock_packer) { instance_double(Shakapacker, config: mock_config) }
95+
let(:mock_config) { double("MockConfig") }
96+
let(:mock_packer) { double("MockPacker", config: mock_config) }
9797

9898
before do
9999
allow(described_class).to receive(:packer).and_return(mock_packer)

0 commit comments

Comments
 (0)