Module: ActiveSupport::Testing::SetupAndTeardown::ClassMethods

Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/testing/setup_and_teardown.rb

Instance Method Summary collapse

Instance Method Details

#setup(*args, &block) ⇒ Object

Add a callback, which runs before TestCase#setup.



29
30
31
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/testing/setup_and_teardown.rb', line 29

def setup(*args, &block)
  set_callback(:setup, :before, *args, &block)
end

#teardown(*args, &block) ⇒ Object

Add a callback, which runs after TestCase#teardown.



34
35
36
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activesupport-7.0.4/lib/active_support/testing/setup_and_teardown.rb', line 34

def teardown(*args, &block)
  set_callback(:teardown, :after, *args, &block)
end