Sha256: 54a1944295ca22038afe846bf2b1303dd88b443f2e4d3bd4d719d46e9fb1e556

Contents?: true

Size: 573 Bytes

Versions: 24

Compression:

Stored size: 573 Bytes

Contents

require 'spec_helper'

describe Launchy::Detect::HostOs do

  it "uses the defult host os from ruby's config" do
    _(Launchy::Detect::HostOs.new.host_os).must_equal RbConfig::CONFIG['host_os']
  end

  it "uses the passed in value as the host os" do
    _(Launchy::Detect::HostOs.new( "fake-os-1").host_os).must_equal "fake-os-1"
  end

  it "uses the environment variable LAUNCHY_HOST_OS to override ruby's config" do
    ENV['LAUNCHY_HOST_OS'] = "fake-os-2"
    _(Launchy::Detect::HostOs.new.host_os).must_equal "fake-os-2"
    ENV.delete('LAUNCHY_HOST_OS')
  end

end

Version data entries

24 entries across 15 versions & 2 rubygems

Version Path
launchy-3.0.0 spec/detect/host_os_spec.rb
launchy-2.5.2 spec/detect/host_os_spec.rb
tdiary-5.2.4 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.2.3 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.2.2 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.2.1 vendor/bundle/ruby/3.1.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/tdiary-5.1.4/vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.4 vendor/bundle/ruby/2.7.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb
tdiary-5.1.3 vendor/bundle/ruby/2.6.0/gems/launchy-2.5.0/spec/detect/host_os_spec.rb