Sha256: a4e739742796ac09c108423081de4bd8109b11a97fcd8e1023bbc474844ea505
Contents?: true
Size: 720 Bytes
Versions: 11
Compression:
Stored size: 720 Bytes
Contents
#! /usr/bin/env ruby 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
11 entries across 11 versions & 2 rubygems