spec/support/suspenders.rb in welaika-suspenders-2.24.0 vs spec/support/suspenders.rb in welaika-suspenders-2.25.0

- old
+ new

@@ -8,20 +8,31 @@ def create_tmp_directory FileUtils.mkdir_p(tmp_path) end def run_suspenders(arguments = nil) + arguments = "--path=#{root_path} #{arguments}" Dir.chdir(tmp_path) do Bundler.with_clean_env do add_fakes_to_path ` #{suspenders_bin} #{APP_NAME} #{arguments} ` end end end + def suspenders_help_command + Dir.chdir(tmp_path) do + Bundler.with_clean_env do + ` + #{suspenders_bin} -h + ` + end + end + end + def setup_app_dependencies if File.exist?(project_path) Dir.chdir(project_path) do Bundler.with_clean_env do `bundle check || bundle install` @@ -44,9 +55,13 @@ ENV["PATH"] = "#{support_bin}:#{ENV['PATH']}" end def project_path @project_path ||= Pathname.new("#{tmp_path}/#{APP_NAME}") + end + + def usage_file + @usage_path ||= File.join(root_path, "USAGE") end private def tmp_path