summaryrefslogtreecommitdiff
path: root/spec/unit/shell_spec.rb
diff options
context:
space:
mode:
authorsawanoboly <sawanoboriyu@higanworks.com>2015-04-21 13:36:03 +0900
committersawanoboly <sawanoboriyu@higanworks.com>2015-04-21 13:36:03 +0900
commit9a26ba99476563b3be7e1ca5f8e8ebbf87a8fc6c (patch)
treeb2a6613acd20b6142f0e4dcd327feaf066a855e7 /spec/unit/shell_spec.rb
parent9117b3b7d326948fcbe4da0ea13b0698e1449b9d (diff)
parent4ef31e1c63f02d695fa6f7c8ec3f6cdef0502e1a (diff)
downloadchef-9a26ba99476563b3be7e1ca5f8e8ebbf87a8fc6c.tar.gz
Merge branch 'master' into show_chef_version_on_shell
Diffstat (limited to 'spec/unit/shell_spec.rb')
-rw-r--r--spec/unit/shell_spec.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/unit/shell_spec.rb b/spec/unit/shell_spec.rb
index 4d5581d4d6..e6d11da523 100644
--- a/spec/unit/shell_spec.rb
+++ b/spec/unit/shell_spec.rb
@@ -43,6 +43,8 @@ describe Shell do
before do
Shell.irb_conf = {}
allow(Shell::ShellSession.instance).to receive(:reset!)
+ allow(Chef::Platform).to receive(:windows?).and_return(false)
+ allow(Chef::Util::PathHelper).to receive(:home).and_return('/home/foo')
end
describe "reporting its status" do
@@ -56,7 +58,7 @@ describe Shell do
describe "configuring IRB" do
it "configures irb history" do
Shell.configure_irb
- expect(Shell.irb_conf[:HISTORY_FILE]).to eq("#{ENV['HOME']}/.chef/chef_shell_history")
+ expect(Shell.irb_conf[:HISTORY_FILE]).to eq(Chef::Util::PathHelper.home('.chef', 'chef_shell_history'))
expect(Shell.irb_conf[:SAVE_HISTORY]).to eq(1000)
end