Commit 3a26271 1 parent 0590629 commit 3a26271 Copy full SHA for 3a26271
File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 77
77
78
78
describe "run" do
79
79
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 " )
81
81
end
82
82
83
83
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 " )
85
85
end
86
86
87
87
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 " )
89
89
end
90
90
91
91
it "can run a command from the Procfile" do
92
92
expect ( forked_foreman ( "run -f #{ resource_path ( "Procfile" ) } test" ) ) . to eq ( "testing\n " )
93
93
end
94
94
95
95
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 )
98
98
end
99
99
end
100
100
You can’t perform that action at this time.
0 commit comments