Skip to content

Commit 01debc0

Browse files
committed
Fix generate spec to actually test for overwriting
The bashly.yml that the spec uses does not define a "cli-get" command, so if the generator *were* overwriting this file the spec would not catch it. Change the spec to use a command name that the example yml does have, so that it would be overwritten if this happens.
1 parent 42c3ce0 commit 01debc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/bashly/commands/generate_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
context "when source files already exist" do
2929
before do
3030
expect { subject.run %w[generate] }.to output_approval('cli/generate/no-args')
31-
File.write "#{source_dir}/cli_get_command.sh", "some new user content"
31+
File.write "#{source_dir}/download_command.sh", "some new user content"
3232
end
3333

3434
it "does not overwrite them" do
3535
expect { subject.run %w[generate] }.to output_approval('cli/generate/no-args-skip')
36-
expect(File.read "#{source_dir}/cli_get_command.sh").to eq "some new user content"
36+
expect(File.read "#{source_dir}/download_command.sh").to eq "some new user content"
3737
end
3838
end
3939

0 commit comments

Comments
 (0)