inspec/test/unit/resources/os_env_test.rb
Ryan Davis a5309ea392 blindly applied chefstyle -a
Signed-off-by: Ryan Davis <zenspider@chef.io>
2019-06-11 18:52:03 -07:00

15 lines
591 B
Ruby

require "helper"
require "inspec/resource"
require "inspec/resources/os_env"
describe "Inspec::Resources::OsEnv" do
it "verify env parsing" do
resource = load_resource("os_env", "PATH")
_(resource.split).must_equal %w{/usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin}
end
it "read env variable on Windows" do
resource = MockLoader.new(:windows).load_resource("os_env", "PATH")
_(resource.split).must_equal ['C:\Windows\system32', 'C:\Windows', 'C:\Windows\System32\Wbem', 'C:\Windows\System32\WindowsPowerShell\v1.0\\', 'C:\opscode\chef\bin\\']
end
end