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

Version Path
cocaine-0.5.4 spec/support/stub_os.rb
cocaine-0.5.3 spec/support/stub_os.rb
cocaine-0.5.2 spec/support/stub_os.rb
cocaine-0.5.1 spec/support/stub_os.rb
cocaine-0.5.0 spec/support/stub_os.rb
cocaine-0.4.2 spec/support/stub_os.rb
cocaine-0.4.1 spec/support/stub_os.rb
cocaine-0.4.0 spec/support/stub_os.rb
cocaine-0.3.2 spec/support/stub_os.rb
cocaine-0.3.1 spec/support/stub_os.rb
cocaine-0.3.0 spec/support/stub_os.rb