Sha256: 493c37f63e90096c217211074c428a09b2c0a42527a422bffe29a0d965d5ce37

Contents?: true

Size: 1.71 KB

Versions: 2

Compression:

Stored size: 1.71 KB

Contents

# encoding: utf-8
require 'rubygems'
require 'spork'


# ----------------------------------------------------------------------------------------------------------------------
# Spork prefork
# Loading more in this block will cause your tests to run faster. However, if you change any
# configuration or code from libraries loaded here, you'll need to restart spork for it take effect.
# ----------------------------------------------------------------------------------------------------------------------

Spork.prefork do

  # ----- code coverage

  if ENV["COVERAGE"] and not ENV['DRB']
    require 'simplecov'
    SimpleCov.start
  end

  # ----- requirements

  require 'rspec'
  require 'ndd/rspec/matchers'


  # ----- RSpec configuration

  RSpec.configure do |config|

    config.mock_with :rspec

    # ----- filters
    config.treat_symbols_as_metadata_keys_with_true_values = true
    config.alias_example_to :fit, :focused
    config.fail_fast = false
    config.filter_run :focused
    config.run_all_when_everything_filtered = true

    # ----- libraries
    # Ndd-RSpec
    config.include Ndd::RSpec::Matchers, :type => :matcher
  end

end


# ----------------------------------------------------------------------------------------------------------------------
# Spork each_run
# This code will be run each time you run your specs.
# ----------------------------------------------------------------------------------------------------------------------

Spork.each_run do

  # ----- code coverage

  if ENV["COVERAGE"] and not ENV['DRB']
    require 'simplecov'
    SimpleCov.start
  end

  # ----- files reload
  lib_path = File.expand_path('../../lib', __FILE__)
  Dir["#{lib_path}/**/*.rb"].each do |file|
    load file
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ndd-rspec-0.1.1 spec/spec_helper.rb
ndd-rspec-0.1.0 spec/spec_helper.rb