Sha256: 107bd7b55a4f47f45451fe04b36872bdd62956b4b82d44b21cd1ac28be914a81
Contents?: true
Size: 672 Bytes
Versions: 12
Compression:
Stored size: 672 Bytes
Contents
# ActiveStupor defines its own idiom for the class-level setup method # (using callback chains). This hack is to ensure that Contest users can # still call the setup method with a block. if RAILS_ENV == 'test' require File.join(File.dirname(__FILE__), '..', 'lib', 'contest') require "active_support/test_case" class Test::Unit::TestCase class << self alias contest_setup setup end end class ActiveSupport::TestCase class << self alias activesupport_setup setup end def self.setup(*args, &block) if args.empty? contest_setup(&block) else activesupport_setup(*args) end end end end
Version data entries
12 entries across 12 versions & 5 rubygems