diff options
-rw-r--r-- | lib/chef/shell.rb | 4 | ||||
-rw-r--r-- | spec/unit/shell_spec.rb | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/shell.rb b/lib/chef/shell.rb index ee4fe78808..1589832bef 100644 --- a/lib/chef/shell.rb +++ b/lib/chef/shell.rb @@ -108,9 +108,9 @@ module Shell irb_conf[:IRB_RC] = lambda do |conf| m = conf.main - conf.prompt_c = "chef#{leader(m)} > " + conf.prompt_c = "chef#{leader(m)} (#{Chef::VERSION})> " conf.return_format = " => %s \n" - conf.prompt_i = "chef#{leader(m)} > " + conf.prompt_i = "chef#{leader(m)} (#{Chef::VERSION})> " conf.prompt_n = "chef#{leader(m)} ?> " conf.prompt_s = "chef#{leader(m)}%l> " conf.use_tracer = false diff --git a/spec/unit/shell_spec.rb b/spec/unit/shell_spec.rb index 617abcfde2..4d5581d4d6 100644 --- a/spec/unit/shell_spec.rb +++ b/spec/unit/shell_spec.rb @@ -67,9 +67,9 @@ describe Shell do conf.main = Object.new conf.main.instance_eval(&ObjectTestHarness) Shell.irb_conf[:IRB_RC].call(conf) - expect(conf.prompt_c).to eq("chef > ") + expect(conf.prompt_c).to eq("chef (#{Chef::VERSION})> ") expect(conf.return_format).to eq(" => %s \n") - expect(conf.prompt_i).to eq("chef > ") + expect(conf.prompt_i).to eq("chef (#{Chef::VERSION})> ") expect(conf.prompt_n).to eq("chef ?> ") expect(conf.prompt_s).to eq("chef%l> ") expect(conf.use_tracer).to eq(false) @@ -82,8 +82,8 @@ describe Shell do events = Chef::EventDispatch::Dispatcher.new conf.main = Chef::Recipe.new(nil,nil,Chef::RunContext.new(Chef::Node.new, {}, events)) Shell.irb_conf[:IRB_RC].call(conf) - expect(conf.prompt_c).to eq("chef:recipe > ") - expect(conf.prompt_i).to eq("chef:recipe > ") + expect(conf.prompt_c).to eq("chef:recipe (#{Chef::VERSION})> ") + expect(conf.prompt_i).to eq("chef:recipe (#{Chef::VERSION})> ") expect(conf.prompt_n).to eq("chef:recipe ?> ") expect(conf.prompt_s).to eq("chef:recipe%l> ") end @@ -94,8 +94,8 @@ describe Shell do conf = OpenStruct.new conf.main = Chef::Node.new Shell.irb_conf[:IRB_RC].call(conf) - expect(conf.prompt_c).to eq("chef:attributes > ") - expect(conf.prompt_i).to eq("chef:attributes > ") + expect(conf.prompt_c).to eq("chef:attributes (#{Chef::VERSION})> ") + expect(conf.prompt_i).to eq("chef:attributes (#{Chef::VERSION})> ") expect(conf.prompt_n).to eq("chef:attributes ?> ") expect(conf.prompt_s).to eq("chef:attributes%l> ") end |