lib/react_on_rails/test_helper/ensure_assets_compiled.rb
def call
        # Only check this ONCE during a test run
        return if self.class.has_been_run

        # Be sure we don't do this again.
        self.class.has_been_run = true

        ReactOnRails::Locales.compile

        stale_gen_files = webpack_assets_status_checker.stale_generated_webpack_files

        # All done if no stale files!
        return if stale_gen_files.empty?

        # Inform the developer that we're ensuring gen assets are ready.
        puts_start_compile_check_message(stale_gen_files)

        webpack_assets_compiler.compile_assets
      end
# Several Scenarios:
# 1. No webpack watch processes for static assets and files are mising or out of date.
# 2. Only webpack watch process for server bundle as we're the  hot reloading setup.
# 3. For whatever reason, the watch processes are running, but some clean script removed
#    the generated bundles.
Several Scenarios:
1. No webpack watch processes for static assets and files are mising or out of date.
2. Only webpack watch process for server bundle as we're the  hot reloading setup.
3. For whatever reason, the watch processes are running, but some clean script removed
the generated bundles.
Several Scenarios : 1 . No webpack watch processes for static assets and files are mising or out of date . 2 . Only webpack watch process for server bundle as we ' re the hot reloading setup . 3 . For whatever reason the watch processes are running but some clean script removed the generated bundles .
def call
        return if self.class.has_been_run
        self.class.has_been_run = true
        ReactOnRails::Locales.compile
        stale_gen_files = webpack_assets_status_checker.stale_generated_webpack_files
        return if stale_gen_files.empty?
        puts_start_compile_check_message(stale_gen_files)
        webpack_assets_compiler.compile_assets
      end
def call return if self . class . has_been_run self . class . has_been_run = true ReactOnRails :: Locales . compile stale_gen_files = webpack_assets_status_checker . stale_generated_webpack_files return if stale_gen_files . empty? puts_start_compile_check_message ( stale_gen_files ) webpack_assets_compiler . compile_assets end
Several Scenarios:
1.
Several Scenarios : 1 .
# Only check this ONCE during a test run # Be sure we don't do this again. # All done if no stale files! # Inform the developer that we're ensuring gen assets are ready.