ActiveSupport::Testing::SetupAndTeardown::ClassMethods

module ActiveSupport::Testing::SetupAndTeardown::ClassMethods

Public Instance Methods

setup(*args, &block) Show source

Add a callback, which runs before TestCase#setup.

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

Add a callback, which runs after TestCase#teardown.

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

© 2004–2016 David Heinemeier Hansson
Licensed under the MIT License.

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部