Sha256: d4b07fe10f87ee4139d2685e585542053e7a679e5f0267a471b91d4a37700daa

Contents?: true

Size: 753 Bytes

Versions: 3

Compression:

Stored size: 753 Bytes

Contents

ENV["RAILS_ENV"] = "test"

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

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

  %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

3 entries across 3 versions & 1 rubygems

Version Path
elabs_matchers-0.0.6 spec/spec_helper.rb
elabs_matchers-0.0.5 spec/spec_helper.rb
elabs_matchers-0.0.4 spec/spec_helper.rb