aboutsummaryrefslogblamecommitdiffstats
path: root/test/helper.rb
blob: 87f5756d24fe5ca48877be02995f51a0b0cae2e3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                             
                                         
 

                                             

                        
                                                                  
     
   








                                                   
require 'rubygems'
require 'minitest/autorun'
require 'fileutils'
require 'arel'

require 'support/fake_record'
Arel::Table.engine = FakeRecord::Base.new

$arel_silence_type_casting_deprecation = true

class Object
  def must_be_like other
    gsub(/\s+/, ' ').strip.must_equal other.gsub(/\s+/, ' ').strip
  end
end

module Arel
  class Test < MiniTest::Test
    def assert_like expected, actual
      assert_equal expected.gsub(/\s+/, ' ').strip,
                   actual.gsub(/\s+/, ' ').strip
    end
  end
end