Skip to Content Skip to Search

module ActiveSupport::Testing::SetupAndTeardown::ClassMethods

Public instance methods

Add a callback, which runs before TestCase#setup.

Source code GitHub
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 29
def setup(*args, &block)
  set_callback(:setup, :before, *args, &block)
end

Add a callback, which runs after TestCase#teardown.

Source code GitHub
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 34
def teardown(*args, &block)
  set_callback(:teardown, :after, *args, &block)
end

Definition files