Sha256: 93b336213f56f99c57014bb770d4518e6b4c6a9bce14bc315796737cdd3fb101
Contents?: true
Size: 696 Bytes
Versions: 126
Compression:
Stored size: 696 Bytes
Contents
require 'spec_helper' describe Pkg::Util::OS do def as_host_os(platform, &block) old = RbConfig::CONFIG['host_os'] RbConfig::CONFIG['host_os'] = platform begin yield ensure RbConfig::CONFIG['host_os'] = old end end it "detects windows when host_os contains mingw" do as_host_os('mingw32') do expect(Pkg::Util::OS).to be_windows end end it "detects windows when host_os contains mswin60" do as_host_os('mswin60') do expect(Pkg::Util::OS).to be_windows end end it "does not detect windows when host_os contains darwin" do as_host_os('darwin12.5.0') do expect(Pkg::Util::OS).to_not be_windows end end end
Version data entries
126 entries across 126 versions & 1 rubygems