Skip to content

Commit

Permalink
Minor updates to convert dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Helen Campbell committed Dec 12, 2017
1 parent c182aa6 commit 58c6cf0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/pdk/module/convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def self.invoke(options)
unless options[:force]
PDK.logger.info _(
'Module conversion is a potentially destructive action. ' \
'Please ensure that you have committed your module to a version control ' \
'Ensure that you have committed your module to a version control ' \
'system or have a backup, and review the changes above before continuing.',
)
continue = PDK::CLI::Util.prompt_for_yes(_('Do you want to continue and make these changes to your module?'))
Expand Down Expand Up @@ -129,7 +129,7 @@ def self.fullreport(update_manager)
f.write("\n\n\n" + diff)
end
end
PDK::Report.default_target.puts(_("\nYou can find detailed differences in convert_report.txt.\n\n"))
PDK::Report.default_target.puts(_("\nYou can find a report of differences in convert_report.txt.\n\n"))
end

def self.generate_banner(text, width = 80)
Expand Down
3 changes: 3 additions & 0 deletions spec/unit/pdk/module/convert_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
allow(update_manager).to receive(:changed?).with('Gemfile').and_return(true)
allow(update_manager).to receive(:remove_file).with(anything)
allow(PDK::Util::Bundler).to receive(:ensure_bundle!)
allow($stdout).to receive(:puts).with(%r{You can find a report of differences in convert_report.txt.})
end

let(:modified_files) do
Expand Down Expand Up @@ -159,6 +160,7 @@
allow(update_manager).to receive(:modify_file).with('metadata.json', anything)
allow(update_manager).to receive(:modify_file).with(template_files[:path], template_files[:content])
allow($stdout).to receive(:puts).with(%r{1 files modified})
allow($stdout).to receive(:puts).with(%r{You can find a report of differences in convert_report.txt.})
end

let(:modified_files) do
Expand Down Expand Up @@ -249,6 +251,7 @@
allow(update_manager).to receive(:modify_file).with('metadata.json', anything)
allow(update_manager).to receive(:add_file).with(template_files[:path], template_files[:content])
allow($stdout).to receive(:puts).with(%r{1 files added})
allow($stdout).to receive(:puts).with(%r{You can find a report of differences in convert_report.txt.})
end

context 'and run normally' do
Expand Down

0 comments on commit 58c6cf0

Please sign in to comment.