Sha256: b26a47ea84e5554eb4b3339e2347cff5402bc980624090a84c83224532cb11a9
Contents?: true
Size: 349 Bytes
Versions: 11
Compression:
Stored size: 349 Bytes
Contents
module StubOS def on_windows! stub_os('mswin') end def on_unix! stub_os('darwin11.0.0') end def on_mingw! stub_os('mingw') end def stub_os(host_string) # http://blog.emptyway.com/2009/11/03/proper-way-to-detect-windows-platform-in-ruby/ RbConfig::CONFIG.stubs(:[]).with('host_os').returns(host_string) end end
Version data entries
11 entries across 11 versions & 1 rubygems