Sha256: a4b5f492f15380b8bb537c6d81148f25950483d2c19cf601a1b29fbf9953a5da
Contents?: true
Size: 897 Bytes
Versions: 17
Compression:
Stored size: 897 Bytes
Contents
require 'spec_helper' module Maid describe Platform do def stub_host_os(value) RbConfig::CONFIG.stub(:[]).with('host_os') { value } end describe 'determining the host OS' do it 'delegates to RbConfig' do stub_host_os('foo') subject.host_os.should == 'foo' end end context 'when running on Ubuntu' do before do stub_host_os('linux-gnu') end it 'is identified as Linux' do subject.linux?.should be_true end it 'is not identified as OS X' do subject.osx?.should be_false end end context 'when running on Mac OS X' do before do stub_host_os('darwin10.0') end it 'is not identified as Linux' do subject.linux?.should be_false end it 'is identified as OS X' do subject.osx?.should be_true end end end end
Version data entries
17 entries across 17 versions & 1 rubygems