diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-05-13 10:28:47 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-05-13 13:06:59 -0700 |
commit | a44f228fde67345dbfac9983e5ef338a8f67307a (patch) | |
tree | de142ab53329d9c16d10e14415c4e7eebfcaeab5 /activerecord/lib/active_record | |
parent | ce1a1b47be2abc42062c24954108550d8a431e1b (diff) | |
download | rails-a44f228fde67345dbfac9983e5ef338a8f67307a.tar.gz rails-a44f228fde67345dbfac9983e5ef338a8f67307a.tar.bz2 rails-a44f228fde67345dbfac9983e5ef338a8f67307a.zip |
backport skip to the AR base class
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/test_case.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/test_case.rb b/activerecord/lib/active_record/test_case.rb index 29efbbcb8c..0d47eb3338 100644 --- a/activerecord/lib/active_record/test_case.rb +++ b/activerecord/lib/active_record/test_case.rb @@ -13,6 +13,13 @@ module ActiveRecord ActiveRecord::IdentityMap.clear end + # Backport skip to Ruby 1.8. test/unit doesn't support it, so just + # make it a noop. + unless instance_methods.map(&:to_s).include?("skip") + def skip(message) + end + end + def assert_date_from_db(expected, actual, message = nil) # SybaseAdapter doesn't have a separate column type just for dates, # so the time is in the string and incorrectly formatted |