Skip to content

Commit

Permalink
resolve pack gen errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Judahmeek committed Jun 26, 2024
1 parent 0f3bdcd commit 861d544
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/dummy/spec/helpers/react_on_rails_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
require "rails_helper"
require "support/script_tag_utils"

Packer = Object.const_get(ReactOnRails::PackerUtils.packer_type.capitalize)

class PlainReactOnRailsHelper
include ReactOnRailsHelper
end

# rubocop:disable Metrics/BlockLength
describe ReactOnRailsHelper do
include Object.const_get(ReactOnRails::PackerUtils.packer_type.capitalize)::Helper
include Packer::Helper
before do
allow(self).to receive(:request) {
Struct.new("Request", :original_url, :env)
Expand Down
5 changes: 5 additions & 0 deletions spec/dummy/spec/packs_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ module ReactOnRails
ReactOnRails.configuration.server_bundle_js_file = server_bundle_js_file
ReactOnRails.configuration.components_subdirectory = "ror_components"
ReactOnRails.configuration.webpack_generated_files = webpack_generated_files
allow(ReactOnRails::PackerUtils).to receive_messages(
manifest_exists?: true,
nested_entries?: true,
packer_source_entry_path: packer_source_entry_path,
)
allow(ReactOnRails::Utils).to receive_messages(generated_assets_full_path: packer_source_entry_path,
server_bundle_js_file_path: server_bundle_js_file_path)
end
Expand Down

0 comments on commit 861d544

Please sign in to comment.