From 3a262714030a83a59388a48ffdb2e93cdac12388 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Fri, 12 Apr 2024 11:00:02 -0600 Subject: [PATCH] dont fail tests when Procfile is present in foreman dir (closes #771) --- spec/foreman/cli_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/foreman/cli_spec.rb b/spec/foreman/cli_spec.rb index b8c3cfee..4995a481 100644 --- a/spec/foreman/cli_spec.rb +++ b/spec/foreman/cli_spec.rb @@ -77,15 +77,15 @@ describe "run" do it "can run a command" do - expect(forked_foreman("run echo 1")).to eq("1\n") + expect(forked_foreman("run -f #{resource_path("Procfile")} echo 1")).to eq("1\n") end it "doesn't parse options for the command" do - expect(forked_foreman("run grep -e FOO #{resource_path(".env")}")).to eq("FOO=bar\n") + expect(forked_foreman("run -f #{resource_path("Procfile")} grep -e FOO #{resource_path(".env")}")).to eq("FOO=bar\n") end it "includes the environment" do - expect(forked_foreman("run -e #{resource_path(".env")} #{resource_path("bin/env FOO")}")).to eq("bar\n") + expect(forked_foreman("run -f #{resource_path("Procfile")} -e #{resource_path(".env")} #{resource_path("bin/env FOO")}")).to eq("bar\n") end it "can run a command from the Procfile" do @@ -93,8 +93,8 @@ end it "exits with the same exit code as the command" do - expect(fork_and_get_exitstatus("run echo 1")).to eq(0) - expect(fork_and_get_exitstatus("run date 'invalid_date'")).to eq(1) + expect(fork_and_get_exitstatus("run -f #{resource_path("Procfile")} echo 1")).to eq(0) + expect(fork_and_get_exitstatus("run -f #{resource_path("Procfile")} date 'invalid_date'")).to eq(1) end end