File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments