Sha256: 9f285cac71b5797a9a067e5ef0ed1ce92ae265b62e7dde90d6eb0f8f25f96bc7

Contents?: true

Size: 959 Bytes

Versions: 10

Compression:

Stored size: 959 Bytes

Contents

require 'spec_helper'

require 'rocket_fuel/precheck'
require 'rocket_fuel/precheck/run'

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

  let(:home_path) { RocketFuel::Precheck::RbenvCheck.home_path }
  let(:global_path) { RocketFuel::Precheck::RbenvCheck.global_path  }
  let(:check) { RocketFuel::Precheck::RbenvCheck.new }

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

  it 'is not ok if rm is found in the global directory' do
    FileUtils.mkdir_p(global_path)
    expect(check).to_not be_ok
  end

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

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

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

Version data entries

10 entries across 10 versions & 1 rubygems

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