File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change 1+ Saved spec/tmp/tada.bash
Original file line number Diff line number Diff line change 3838 system "rm -f hello.bash"
3939 end
4040
41- it "generates the bash script to completely .bash" do
41+ it "generates the bash script to hello .bash" do
4242 expect { subject . run %w[ generate ] } . to output_approval ( 'cli/generate/custom-path-env' )
4343 expect ( File . read "hello.bash" ) . to match_approval ( 'cli/generated-script' )
4444 end
4545 end
4646
47+ context "with COMPLETELY_SCRIPT_PATH env var" do
48+ let ( :outfile ) { 'spec/tmp/tada.bash' }
49+
50+ before do
51+ reset_tmp_dir
52+ ENV [ 'COMPLETELY_SCRIPT_PATH' ] = outfile
53+ end
54+
55+ after do
56+ ENV [ 'COMPLETELY_SCRIPT_PATH' ] = nil
57+ end
58+
59+ it "generates the bash script to the requested path" do
60+ expect { subject . run %w[ generate ] } . to output_approval ( 'cli/generate/custom-path-env2' )
61+ expect ( File . read outfile ) . to match_approval ( 'cli/generated-script' )
62+ end
63+ end
64+
4765 context "with CONFIG_PATH SCRIPT_PATH" do
4866 before { reset_tmp_dir }
4967
You can’t perform that action at this time.
0 commit comments