Skip to content

Commit

Permalink
Add spec for chef#3153 regression
Browse files Browse the repository at this point in the history
  • Loading branch information
jaym committed Mar 27, 2015
1 parent 9b8f47c commit 7a6df30
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions spec/unit/util/path_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,26 @@
end
end
end

describe "all_homes" do
before do
stub_const('ENV', env)
allow(Chef::Platform).to receive(:windows?).and_return(is_windows)
end

context "on windows" do
let (:is_windows) { true }
end

context "on unix" do
let (:is_windows) { false }

context "when HOME is not set" do
let (:env) { {} }
it "returns an empty array" do
expect(PathHelper.all_homes).to eq([])
end
end
end
end
end

0 comments on commit 7a6df30

Please sign in to comment.