Skip to content

Commit 4c7832c

Browse files
committed
Specify paths with Rails.root.join
Locally the e2e_helper.rb file could only be found when cypress was running in headless mode. This shouldn't have been the problem, but it did fix it, and seems like a better way to specify paths.
1 parent cd83125 commit 4c7832c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/cypress_on_rails/command_executor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ def self.perform(file,command_options = nil)
1414
end
1515

1616
def self.load_e2e_helper
17-
e2e_helper_file = "#{configuration.install_folder}/e2e_helper.rb"
18-
cypress_helper_file = "#{configuration.install_folder}/cypress_helper.rb"
17+
e2e_helper_file = Rails.root.join(configuration.install_folder, "e2e_helper.rb")
18+
cypress_helper_file = Rails.root.join(configuration.install_folder, "cypress_helper.rb")
1919
if File.exist?(e2e_helper_file)
2020
Kernel.require e2e_helper_file
2121
elsif File.exist?(cypress_helper_file)

0 commit comments

Comments
 (0)