ActiveSupport::Testing::SetupAndTeardown

module ActiveSupport::Testing::SetupAndTeardown

Included modules:
ActiveSupport::Callbacks

Adds support for setup and teardown callbacks. These callbacks serve as a replacement to overwriting the #setup and #teardown methods of your TestCase.

class ExampleTest < ActiveSupport::TestCase
  setup do
    # ...
  end

  teardown do
    # ...
  end
end

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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部