edge badge
Methods
A
T
Included Modules
Constants
Assertion = Minitest::Assertion
 
Class Public methods
test_order()

Returns the order in which test cases are run.

ActiveSupport::TestCase.test_order # => :random

Possible values are :random, :parallel, :alpha, :sorted. Defaults to :random.

# File activesupport/lib/active_support/test_case.rb, line 38
def test_order
  test_order = ActiveSupport.test_order

  if test_order.nil?
    test_order = :random
    self.test_order = test_order
  end

  test_order
end
test_order=(new_order)

Sets the order in which test cases are run.

ActiveSupport::TestCase.test_order = :random # => :random

Valid values are:

  • :random (to run tests in random order)

  • :parallel (to run tests in parallel)

  • :sorted (to run tests alphabetically by method name)

  • :alpha (equivalent to :sorted)

# File activesupport/lib/active_support/test_case.rb, line 28
def test_order=(new_order)
  ActiveSupport.test_order = new_order
end
Instance Public methods
assert_nothing_raised(*args)

Fails if the block raises an exception.

assert_nothing_raised do
  ...
end
# File activesupport/lib/active_support/test_case.rb, line 83
def assert_nothing_raised(*args)
  yield
end