Sha256: cee5a38fabf1a794b203dbb23480655e7bb938c3fc46dca7d6a43baca23ae8b9
Contents?: true
Size: 359 Bytes
Versions: 2
Compression:
Stored size: 359 Bytes
Contents
module StubOS def on_windows!(host_string = 'mswin') stub_os(host_string) end def on_unix!(host_string = 'darwin11.0.0') stub_os(host_string) 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
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
radiant-1.0.0 | ruby-debug/ruby/1.8/gems/cocaine-0.2.1/spec/support/stub_os.rb |
cocaine-0.2.1 | spec/support/stub_os.rb |