Methods
Instance Public methods
around(*args, &block) Link
Add a callback, which runs between the TestCase#setup callbacks and the TestCase#teardown callbacks. Yields the test class instance and the test case to the block:
class ClientTest < ActiveSupport::TestCase around do |test_case, block| # do client setup block.call # do client teardown end end
Code after a failing test yielded by the block argument will still be executed.
setup(*args, &block) Link
Add a callback, which runs before TestCase#setup.
class ClientTest < ActiveSupport::TestCase setup do # do client setup end end
teardown(*args, &block) Link
Add a callback, which runs after TestCase#teardown.
class ClientTest < ActiveSupport::TestCase teardown do # do client teardown end end