From 388934cad35ac8db7186b4488ec39a7d337c4121 Mon Sep 17 00:00:00 2001 From: Marco Roth Date: Thu, 2 May 2024 16:40:57 -0400 Subject: [PATCH] fix tests --- test/generators/stimulus_reflex_generator_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/generators/stimulus_reflex_generator_test.rb b/test/generators/stimulus_reflex_generator_test.rb index ab4f59f3..c1b53101 100644 --- a/test/generators/stimulus_reflex_generator_test.rb +++ b/test/generators/stimulus_reflex_generator_test.rb @@ -6,11 +6,11 @@ require "stimulus_reflex/installer" def stub_entrypoint(path = "tmp/app/javascript") - File.write(installer_entrypoint_path, path) + File.write(StimulusReflex::Installer.installer_entrypoint_path, path) end def stub_bundler(bundler = "importmaps") - File.write(installer_bundler_path, bundler) + File.write(StimulusReflex::Installer.installer_bundler_path, bundler) end class StimulusReflexGeneratorTest < Rails::Generators::TestCase @@ -19,15 +19,15 @@ class StimulusReflexGeneratorTest < Rails::Generators::TestCase setup :prepare_destination setup do - File.delete(installer_entrypoint_path) if File.exist?(installer_entrypoint_path) - File.delete(installer_bundler_path) if File.exist?(installer_bundler_path) + File.delete(StimulusReflex::Installer.installer_entrypoint_path) if File.exist?(StimulusReflex::Installer.installer_entrypoint_path) + File.delete(StimulusReflex::Installer.installer_bundler_path) if File.exist?(StimulusReflex::Installer.installer_bundler_path) FileUtils.rm_rf("tmp/app") FileUtils.rm_rf("tmp/stimulus_reflex_installer") end teardown do - File.delete(installer_entrypoint_path) if File.exist?(installer_entrypoint_path) - File.delete(installer_bundler_path) if File.exist?(installer_bundler_path) + File.delete(StimulusReflex::Installer.installer_entrypoint_path) if File.exist?(StimulusReflex::Installer.installer_entrypoint_path) + File.delete(StimulusReflex::Installer.installer_bundler_path) if File.exist?(StimulusReflex::Installer.installer_bundler_path) FileUtils.rm_rf("tmp/app") FileUtils.rm_rf("tmp/stimulus_reflex_installer") end