Permalink
Browse files

backport skip to the AR base class

  • Loading branch information...
1 parent 7775670 commit e4f48b97a4ea71d5d9601aef338268f06b8e6abf @tenderlove tenderlove committed May 13, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 activerecord/lib/active_record/test_case.rb
@@ -3,6 +3,13 @@ module ActiveRecord
#
# Defines some test assertions to test against SQL queries.
class TestCase < ActiveSupport::TestCase #:nodoc:
+ # 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

0 comments on commit e4f48b9

Please sign in to comment.