Sha256: c056c2031c8e01af715d49817eb831f7f55b2778adb76c3bf8f1f87646480a3c
Contents?: true
Size: 859 Bytes
Versions: 83
Compression:
Stored size: 859 Bytes
Contents
module ActiveRecordTestCase def setup_with_fixtures methods_called << :setup_with_fixtures end alias_method :setup, :setup_with_fixtures def teardown_with_fixtures methods_called << :teardown_with_fixtures end alias_method :teardown, :teardown_with_fixtures def self.method_added(method) case method.to_s when 'setup' unless method_defined?(:setup_without_fixtures) alias_method :setup_without_fixtures, :setup define_method(:setup) do setup_with_fixtures setup_without_fixtures end end when 'teardown' unless method_defined?(:teardown_without_fixtures) alias_method :teardown_without_fixtures, :teardown define_method(:teardown) do teardown_without_fixtures teardown_with_fixtures end end end end end
Version data entries
83 entries across 83 versions & 7 rubygems