Sha256: 3292d477ba29656ac4dd0a0a7d6c6f2badd2ba21baedf9c3e58bbc7a56dc0b20

Contents?: true

Size: 696 Bytes

Versions: 2

Compression:

Stored size: 696 Bytes

Contents

require 'rubygems'
require 'bundler'
require 'spork'

Spork.prefork do
  APP_ROOT = File.expand_path('../../', __FILE__)
  ENV["BERKSHELF_PATH"] = File.join(APP_ROOT, 'spec', 'tmp', 'berkshelf')

  require 'rspec'

  RSpec.configure do |config|
    config.mock_with :rspec
    config.treat_symbols_as_metadata_keys_with_true_values = true
    config.filter_run focus: true
    config.run_all_when_everything_filtered = true

    config.around(:each) do
      clean_tmp_path
    end
  end

  def clean_tmp_path
    FileUtils.rm_rf(tmp_path)
    FileUtils.mkdir_p(tmp_path)
  end

  def tmp_path
    File.join(APP_ROOT, 'spec', 'tmp')
  end
end

Spork.each_run do
  require 'berkshelf/vagrant'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
berkshelf-vagrant-1.0.3 spec/spec_helper.rb
berkshelf-vagrant-1.0.0.rc1 spec/spec_helper.rb