Sha256: 40bc9e102b39554a8eefd485154b19a666cd4c71d22892f4208ff2f3b9ca9361

Contents?: true

Size: 947 Bytes

Versions: 2

Compression:

Stored size: 947 Bytes

Contents

ENV["RAILS_ENV"] = "test"

require "rubygems"
require "bundler/setup"
require "capybara"
require "active_model"
require "elabs_matchers"

I18n.enforce_available_locales = true

RSpec.configure do |config|
  config.mock_with :rspec
  config.include Capybara::DSL

  config.expect_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  config.mock_with :rspec do |c|
    c.syntax = [:should, :expect]
  end

  %w[helpers matchers].each do |dir|
    Dir[File.join(File.expand_path(File.dirname(__FILE__)), "../lib/elabs_matchers/#{dir}/*.rb")].each do |file|
      file = file.split("/").last.split(".").first
      config.include("ElabsMatchers::#{dir.camelize}::#{file.camelize}".constantize)
    end
  end

  config.after do
    ElabsMatchers.use_default_configuration!
  end
end

module RSpec
  module Matchers
    def fail_assertion(message = nil)
      raise_error(RSpec::Expectations::ExpectationNotMetError, message)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
elabs_matchers-1.0.1 spec/spec_helper.rb
elabs_matchers-1.0.0 spec/spec_helper.rb