Skip to content

Commit 3a26271

Browse files
committed
dont fail tests when Procfile is present in foreman dir (closes #771)
1 parent 0590629 commit 3a26271

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/foreman/cli_spec.rb

+5-5
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,24 @@
7777

7878
describe "run" do
7979
it "can run a command" do
80-
expect(forked_foreman("run echo 1")).to eq("1\n")
80+
expect(forked_foreman("run -f #{resource_path("Procfile")} echo 1")).to eq("1\n")
8181
end
8282

8383
it "doesn't parse options for the command" do
84-
expect(forked_foreman("run grep -e FOO #{resource_path(".env")}")).to eq("FOO=bar\n")
84+
expect(forked_foreman("run -f #{resource_path("Procfile")} grep -e FOO #{resource_path(".env")}")).to eq("FOO=bar\n")
8585
end
8686

8787
it "includes the environment" do
88-
expect(forked_foreman("run -e #{resource_path(".env")} #{resource_path("bin/env FOO")}")).to eq("bar\n")
88+
expect(forked_foreman("run -f #{resource_path("Procfile")} -e #{resource_path(".env")} #{resource_path("bin/env FOO")}")).to eq("bar\n")
8989
end
9090

9191
it "can run a command from the Procfile" do
9292
expect(forked_foreman("run -f #{resource_path("Procfile")} test")).to eq("testing\n")
9393
end
9494

9595
it "exits with the same exit code as the command" do
96-
expect(fork_and_get_exitstatus("run echo 1")).to eq(0)
97-
expect(fork_and_get_exitstatus("run date 'invalid_date'")).to eq(1)
96+
expect(fork_and_get_exitstatus("run -f #{resource_path("Procfile")} echo 1")).to eq(0)
97+
expect(fork_and_get_exitstatus("run -f #{resource_path("Procfile")} date 'invalid_date'")).to eq(1)
9898
end
9999
end
100100

0 commit comments

Comments
 (0)