Skip to content

Commit 019d131

Browse files
Refactor JavaScript pack tag expectations in ReactOnRailsHelper spec
- Simplified the expectation for the JavaScript pack tag in the ReactOnRailsHelper spec by removing conditional checks based on the CI_PACKER_VERSION environment variable. - This change enhances the clarity of the test and ensures consistent behavior across different environments.
1 parent 91cfd41 commit 019d131

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

spec/dummy/spec/helpers/react_on_rails_helper_spec.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,7 @@ class PlainReactOnRailsHelper
6464
allow(helper).to receive(:append_stylesheet_pack_tag)
6565
expect { helper.load_pack_for_generated_component("component_name", render_options) }.not_to raise_error
6666

67-
if ENV["CI_PACKER_VERSION"] == "oldest"
68-
expect(helper).to have_received(:append_javascript_pack_tag).with("generated/component_name", { defer: false })
69-
else
70-
expect(helper).to have_received(:append_javascript_pack_tag)
71-
.with("generated/component_name", { defer: false, async: true })
72-
end
67+
expect(helper).to have_received(:append_javascript_pack_tag).with("generated/component_name", { defer: false })
7368
expect(helper).to have_received(:append_stylesheet_pack_tag).with("generated/component_name")
7469
end
7570

0 commit comments

Comments
 (0)