Sha256: 840a539d35c55d5caf45115ebd1ce2c8d4ec9d00a37d1df766b3b38e1de9ab75

Contents?: true

Size: 977 Bytes

Versions: 10

Compression:

Stored size: 977 Bytes

Contents

require 'spec_helper'

require 'rocket_fuel/precheck'

require 'fakefs'
require 'fakefs/spec_helpers'
require 'fileutils'

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

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

  it 'is not ok if rvm 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 rvm is found in the global directory' do
    FileUtils.mkdir_p(global_path)
    expect(check).to_not be_ok
  end

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

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

  it 'has a failure message if rvm 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/rvm_check_spec.rb
rocket_fuel-0.1.0 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.8 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.7 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.6 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.5 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.4 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.3 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.2 spec/rocket_fuel/precheck/rvm_check_spec.rb
rocket_fuel-0.0.1 spec/rocket_fuel/precheck/rvm_check_spec.rb