Sha256: 452b9a5c9b083bc6cfd513bbefeabe06b0f2d309071f9bd99679eb79a295037c

Contents?: true

Size: 775 Bytes

Versions: 5

Compression:

Stored size: 775 Bytes

Contents

require File.expand_path('spec_helper.rb', File.dirname(__FILE__))

describe 'For OSX (Snow Leopard, 10.6),' do
  before(:each) do
    ENV.stub!(:[]).with('OS').and_return(nil)
    # Issues stubbing RUBY_PLATFORM, using RbConfig instead.
    # Kernel.stub!(:RUBY_PLATFORM => "x86_64-darwin10.6")
    RbConfig::CONFIG.stub!(:[]).with('host_os').and_return("darwin10.6.0")
    RbConfig::CONFIG.stub!(:[]).with('host_cpu').and_return('i386')
  end

  describe OS do
    subject { OS } # class, not instance

    it { should be_mac }
    it { should be_osx }
    it { should be_posix }

    it { should_not be_windows }

  end

  describe OS::Underlying do
    subject { OS::Underlying } # class, not instance

    it { should be_bsd }
    it { should_not be_windows }
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
os-0.9.3 spec/osx_spec.rb
os-0.9.2 spec/osx_spec.rb
os-0.9.1 spec/osx_spec.rb
os-0.9.0 spec/osx_spec.rb
os-0.8.0 spec/osx_spec.rb