Sha256: 55b32173ddc2471af71a29e99989d92674573a85d856306832bf25e093b6ae20

Contents?: true

Size: 938 Bytes

Versions: 10

Compression:

Stored size: 938 Bytes

Contents

require 'spec_helper'

require 'rocket_fuel/precheck/macports_check'

describe RocketFuel::Precheck::MacportsCheck do
  include FakeFS::SpecHelpers

  let(:path) { RocketFuel::Precheck::MacportsCheck.bin_path }
  let(:check) { RocketFuel::Precheck::MacportsCheck.new }

  it 'is not ok if macports is found in the users home directory' do
    FileUtils.mkdir_p(path)
    expect(check).to_not be_ok
  end

  it 'is ok if macports is not found or installed' do
    expect(check).to be_ok
  end

  it 'has a success message if macports is not found' do
    expect(check.message).to match(/not found/i)
  end

  it 'has a failure message if macports is found' do
    FileUtils.mkdir_p(path)
    expect(check.message).to match(/found/i)
  end

  it 'does not check if not run on a Mac' do
    os = RocketFuel::OperatingSystem.new('linux', '2.6')
    RocketFuel::SystemDetails.stubs(:os).returns(os)
    expect(check).to_not be_check
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rocket_fuel-0.2.0 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.1.0 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.8 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.7 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.6 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.5 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.4 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.3 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.2 spec/rocket_fuel/precheck/macports_check_spec.rb
rocket_fuel-0.0.1 spec/rocket_fuel/precheck/macports_check_spec.rb