1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/test/helper.rb
Sean Griffin 008445d6fd Deprecate automatic type casting within Arel
Rails now performs all casting eagerly, before passing the value into
Arel. Once we remove this, the code on both sides will be simplified
greatly. Ideally, we can provide the appropriate public APIs on the
Rails side to ease this transition for library authors who depend on
this behavior.
2014-12-26 18:02:56 -07:00

24 lines
516 B
Ruby

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