Sha256: fbe4e72220fd8ee748895b45b6ed807193ce52f9703e0f54c5845daccf494308

Contents?: true

Size: 357 Bytes

Versions: 1

Compression:

Stored size: 357 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/
    Config::CONFIG.stubs(:[]).with('host_os').returns(host_string)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocaine-0.2.0 spec/support/stub_os.rb