class method self.included

Ruby on Rails 2.2.3

Since v2.2.3 Last seen in v2.3.18

Available in: v2.2.3 v2.3.18

Signature

self.included(base)

No documentation comment.

Parameters

base req
Source
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 12
      def self.included(base)
        base.class_eval do
          include ActiveSupport::Callbacks
          define_callbacks :setup, :teardown

          if defined?(::Mini)
            undef_method :run
            alias_method :run, :run_with_callbacks_and_miniunit
          else
            begin
              require 'mocha'
              undef_method :run
              alias_method :run, :run_with_callbacks_and_mocha
            rescue LoadError
              undef_method :run
              alias_method :run, :run_with_callbacks_and_testunit
            end
          end
        end
      end

Defined in activesupport/lib/active_support/testing/setup_and_teardown.rb line 12 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Testing::SetupAndTeardown

Type at least 2 characters to search.

↑↓ navigate · open · esc close