Skip to content

Commit c5ae0f9

Browse files
justin808claude
andcommitted
Remove legacy 'without packer' test scenarios and using_packer? references
Since React on Rails 16 is Shakapacker-only, the following test scenarios are no longer relevant and have been removed: - 'without packer enabled' shared context and tests - Test context for "when not using packer" in react_client_manifest_file_path - References to using_packer? method which was removed This eliminates test failures for scenarios that can't happen in React on Rails 16. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1e2f03c commit c5ae0f9

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

spec/react_on_rails/utils_spec.rb

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,6 @@ module ReactOnRails
3535
end
3636
end
3737

38-
shared_context "without packer enabled" do
39-
before do
40-
allow(ReactOnRails).to receive_message_chain(:configuration, :generated_assets_dir)
41-
.and_return("public/webpack/dev")
42-
allow(described_class).to receive(:gem_available?).with("shakapacker").and_return(false)
43-
end
44-
45-
it "does not use packer" do
46-
expect(ReactOnRails::PackerUtils.packer).to be_nil
47-
end
48-
end
49-
5038
def mock_bundle_in_manifest(bundle_name, hashed_bundle)
5139
mock_manifest = instance_double(Shakapacker::Manifest)
5240
allow(mock_manifest).to receive(:lookup!)
@@ -132,12 +120,6 @@ def mock_dev_server_running
132120
end
133121
end
134122
end
135-
136-
context "without a packer enabled" do
137-
include_context "without packer enabled"
138-
139-
it { is_expected.to eq(File.expand_path(File.join(Rails.root, "public/webpack/dev/webpack-bundle.js"))) }
140-
end
141123
end
142124

143125
describe ".source_path_is_not_defined_and_custom_node_modules?" do
@@ -500,7 +482,6 @@ def mock_dev_server_running
500482
let(:public_output_path) { "/path/to/public/webpack/dev" }
501483

502484
before do
503-
allow(ReactOnRails::PackerUtils).to receive(:using_packer?).and_return(true)
504485
allow(ReactOnRails::PackerUtils.packer).to receive_message_chain("config.public_output_path")
505486
.and_return(Pathname.new(public_output_path))
506487
allow(ReactOnRails::PackerUtils.packer).to receive_message_chain("config.public_path")
@@ -537,19 +518,6 @@ def mock_dev_server_running
537518
end
538519
end
539520
end
540-
541-
context "when not using packer" do
542-
before do
543-
allow(ReactOnRails::PackerUtils).to receive(:using_packer?).and_return(false)
544-
allow(described_class).to receive(:generated_assets_full_path)
545-
.and_return("/path/to/generated/assets")
546-
end
547-
548-
it "returns joined path with generated_assets_full_path" do
549-
expect(described_class.react_client_manifest_file_path)
550-
.to eq("/path/to/generated/assets/react-client-manifest.json")
551-
end
552-
end
553521
end
554522

555523
describe ".react_server_client_manifest_file_path" do

0 commit comments

Comments
 (0)