Sha256: ec60de55660234a082bc92b26f19023fc2d0674cfc80d850ec1f2f3399161063

Contents?: true

Size: 1.32 KB

Versions: 6

Compression:

Stored size: 1.32 KB

Contents

# add lib to the load path just like rubygems does
$:.unshift File.expand_path("../../lib", __FILE__)
require "simplecov"

require "date"
require "test_construct"
require "json"
require "pry-nav"

require "metric_fu"
include MetricFu
def mf_log(msg); mf_debug(msg); end

# Requires supporting ruby files with custom matchers and macros, etc,
# in spec/support/ and its subdirectories.
Dir[MetricFu.root_dir + "/spec/support/**/*.rb"].each { |f| require f }

RSpec.configure do |config|
  config.filter_run focus: true
  config.run_all_when_everything_filtered = true
  # Skip specs tagged `:slow` unless SLOW_SPECS is set
  config.filter_run_excluding :slow unless ENV["SLOW_SPECS"]
  # End specs on first failure if FAIL_FAST is set
  config.fail_fast = ENV.include?("FAIL_FAST")
  config.order = :rand
  config.color = true
  config.expect_with :rspec do |expectations|
    expectations.syntax = :expect
  end
  config.mock_with :rspec do |mocks|
    mocks.syntax = :expect
    mocks.verify_partial_doubles = true
  end

  # :suite after/before all specs
  # :each every describe block
  # :all every it block

  def run_dir
    File.expand_path("dummy", File.dirname(__FILE__))
  end

  config.before(:suite) do
    MetricFu.run_dir = run_dir
  end

  config.after(:suite) do
    cleanup_fs
  end

  config.after(:each) do
    MetricFu.reset
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
code_metric_fu-4.14.4 spec/spec_helper.rb
code_metric_fu-4.14.3 spec/spec_helper.rb
code_metric_fu-4.14.2 spec/spec_helper.rb
code_metric_fu-4.14.1 spec/spec_helper.rb
code_metric_fu-4.14.0 spec/spec_helper.rb
metric_fu-4.12.0 spec/spec_helper.rb