Sha256: 6f3dbbbef1318eeaf34718f512c3b350f7fd68bfa857ab6d6c2c25ebb566145c

Contents?: true

Size: 1.15 KB

Versions: 52

Compression:

Stored size: 1.15 KB

Contents

require 'rubygems'
require 'bundler'
require 'buff/ruby_engine'

def setup_rspec
  require 'rspec'
  require 'json_spec'
  require 'webmock/rspec'

  Dir[File.join(File.expand_path("../../spec/support/**/*.rb", __FILE__))].each { |f| require f }

  RSpec.configure do |config|
    config.include Ridley::SpecHelpers
    config.include Ridley::RSpec::ChefServer
    config.include JsonSpec::Helpers

    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.before(:suite) do
      WebMock.disable_net_connect!(allow_localhost: true, net_http_connect_on_start: true)
      Ridley::RSpec::ChefServer.start
    end

    config.before(:all) { Ridley.logger = Celluloid.logger = nil }

    config.before(:each) do
      Celluloid.shutdown
      Celluloid.boot
      clean_tmp_path
      Ridley::RSpec::ChefServer.server.clear_data
    end
  end
end

if Buff::RubyEngine.mri? && ENV['CI'] != 'true'
  require 'spork'

  Spork.prefork do
    setup_rspec
  end

  Spork.each_run do
    require 'ridley'
  end
else
  require 'ridley'
  setup_rspec
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
ridley-5.1.1 spec/spec_helper.rb
ridley-5.1.0 spec/spec_helper.rb
ridley-5.0.0 spec/spec_helper.rb
ridley-4.6.1 spec/spec_helper.rb
ridley-4.6.0 spec/spec_helper.rb
ridley-4.5.1 spec/spec_helper.rb
ridley-4.5.0 spec/spec_helper.rb
ridley-4.4.3 spec/spec_helper.rb
ridley-4.4.2 spec/spec_helper.rb
ridley-4.4.1 spec/spec_helper.rb
ridley-4.4.0 spec/spec_helper.rb
ridley-4.3.2 spec/spec_helper.rb
ridley-4.3.1 spec/spec_helper.rb
ridley-4.3.0 spec/spec_helper.rb
ridley-4.2.0 spec/spec_helper.rb
ridley-4.1.2 spec/spec_helper.rb
ridley-4.1.1 spec/spec_helper.rb
ridley-4.1.0 spec/spec_helper.rb
ridley-4.0.0 spec/spec_helper.rb
ridley-3.1.0 spec/spec_helper.rb