Sha256: 8d9923d89643bcd38f026741c90839d6a4b87e0d97d7164acdd1de6a1e5e46ea

Contents?: true

Size: 1.66 KB

Versions: 7

Compression:

Stored size: 1.66 KB

Contents

require 'active_model'

# to avoid deprecation warning:
# [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
I18n.enforce_available_locales = false

require 'rspec/collection_matchers'

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

RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true if RSpec::Expectations::Version::STRING < "3.0"
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  config.order = 'random'

  config.expect_with :rspec do |rspec|
    rspec.syntax = :expect
  end

  config.mock_with :rspec do |rspec|
    rspec.syntax = :expect
  end
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

shared_context "with #expect exclusively enabled", :uses_only_expect do
  orig_syntax = nil

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

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

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
rspec-collection_matchers-1.2.0 spec/spec_helper.rb
rspec-collection_matchers-1.1.3 spec/spec_helper.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/rspec-collection_matchers-1.1.2/spec/spec_helper.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/rspec-collection_matchers-1.1.2/spec/spec_helper.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/rspec-collection_matchers-1.1.2/spec/spec_helper.rb
rspec-collection_matchers-1.1.2 spec/spec_helper.rb
rspec-collection_matchers-1.1.1 spec/spec_helper.rb