Sha256: 0ae27b14520ae24d0e6ce659ae2687cfa36bccae68d51681290ad2910a670a37
Contents?: true
Size: 720 Bytes
Versions: 14
Compression:
Stored size: 720 Bytes
Contents
#!/usr/bin/env rspec require 'spec_helper' require 'facter/util/config' describe Facter::Util::Config do describe "is_windows? function" do it "should detect windows if RbConfig returns a windows OS" do host_os = ["mswin","win32","dos","mingw","cygwin"] host_os.each do |h| RbConfig::CONFIG.expects(:[]).with('host_os').returns(h) Facter::Util::Config.is_windows?.should be_true end end it "should not detect windows if RbConfig returns a non-windows OS" do host_os = ["darwin","linux"] host_os.each do |h| RbConfig::CONFIG.expects(:[]).with('host_os').returns(h) Facter::Util::Config.is_windows?.should be_false end end end end
Version data entries
14 entries across 14 versions & 2 rubygems