Sha256: 6ab44da02c72f878b554f89d7e88e70caccada609a416287c44cab78cb5e4615

Contents?: true

Size: 1.25 KB

Versions: 4

Compression:

Stored size: 1.25 KB

Contents

Dir['./spec/support/**/*'].each {|f| require f}

RSpec::configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.color = true
  config.filter_run :focus
  config.run_all_when_everything_filtered = true
  config.order = :random

  config.expect_with :rspec do |expectations|
    $default_expectation_syntax = expectations.syntax
    expectations.syntax = :expect
  end

  config.include DeprecationHelpers
end

shared_context "with #should enabled", :uses_should do
  orig_syntax = nil

  before(:all) do
    orig_syntax = RSpec::Matchers.configuration.syntax
    RSpec::Matchers.configuration.syntax = [:expect, :should]
  end

  after(:all) do
    RSpec::Matchers.configuration.syntax = orig_syntax
  end
end


shared_context "with #should exclusively enabled", :uses_only_should do
  orig_syntax = nil

  before(:all) do
    orig_syntax = RSpec::Matchers.configuration.syntax
    RSpec::Matchers.configuration.syntax = :should
  end

  after(:all) do
    RSpec::Matchers.configuration.syntax = orig_syntax
  end
end

module TestUnitIntegrationSupport
  include InSubProcess

  def with_test_unit_loaded
    in_sub_process do
      require 'test/unit'
      load 'rspec/matchers/test_unit_integration.rb'
      yield
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rspec-expectations-2.99.2 spec/spec_helper.rb
rspec-expectations-2.99.1 spec/spec_helper.rb
rspec-expectations-2.99.0 spec/spec_helper.rb
rspec-expectations-2.99.0.rc1 spec/spec_helper.rb