summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2015-04-17 12:05:49 -0700
committerJay Mundrawala <jdmundrawala@gmail.com>2015-04-17 12:05:49 -0700
commit466421102c41b4f99e0f503aca631d762bb8455c (patch)
treeb82f3a104438f6ce3facd6891b934272fc1c88e2
parenta47dc90a213ebbd1ee0cdb2db6b588ee6c6111ea (diff)
parent41867de27d99addef88cffb582bac7a660cf1687 (diff)
downloadchef-466421102c41b4f99e0f503aca631d762bb8455c.tar.gz
Merge pull request #3238 from chef/jdm/solaris
Unit testify shell_spec
-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 617abcfde2..acbb1891e7 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