instance method
setup
Ruby on Rails edge
Since v3.0.20Signature
setup(*args, &block)
Add a callback, which runs before TestCase#setup.
class ClientTest < ActiveSupport::TestCase
setup do
# do client setup
end
end
Parameters
-
argsrest -
blockblock
Source
# File activesupport/lib/active_support/testing/setup_and_teardown.rb, line 35
def setup(*args, &block)
set_callback(:setup, :before, *args, &block)
end
Defined in activesupport/lib/active_support/testing/setup_and_teardown.rb line 35
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Testing::SetupAndTeardown::ClassMethods