aboutsummaryrefslogtreecommitdiffstats
path: root/spec/spec_helper.rb
blob: bc117ec47dbf78917dc9daad56474ac7f51228a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
dir = File.dirname(__FILE__)
$LOAD_PATH.unshift "#{dir}/../lib"

require 'rubygems'
require 'spec'
require 'pp'
require 'fileutils'
require 'arel'

[:matchers, :doubles].each do |helper|
  Dir["#{dir}/#{helper}/*"].each { |m| require "#{dir}/#{helper}/#{File.basename(m)}" }
end

Spec::Runner.configure do |config|  
  config.include(BeLikeMatcher, HashTheSameAsMatcher)
  config.mock_with :rr
  config.before do
    Arel::Table.engine = Arel::Engine.new(Fake::Engine.new)
  end
end