From 01debc04fe7ec6d30e85511e13d1e393ed5b4652 Mon Sep 17 00:00:00 2001 From: Wolfgang Faust Date: Wed, 29 Sep 2021 22:55:35 -0700 Subject: [PATCH] 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. --- spec/bashly/commands/generate_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/bashly/commands/generate_spec.rb b/spec/bashly/commands/generate_spec.rb index 88eace50..977b3af6 100644 --- a/spec/bashly/commands/generate_spec.rb +++ b/spec/bashly/commands/generate_spec.rb @@ -28,12 +28,12 @@ context "when source files already exist" do before do expect { subject.run %w[generate] }.to output_approval('cli/generate/no-args') - File.write "#{source_dir}/cli_get_command.sh", "some new user content" + File.write "#{source_dir}/download_command.sh", "some new user content" end it "does not overwrite them" do expect { subject.run %w[generate] }.to output_approval('cli/generate/no-args-skip') - expect(File.read "#{source_dir}/cli_get_command.sh").to eq "some new user content" + expect(File.read "#{source_dir}/download_command.sh").to eq "some new user content" end end