Class: ActiveSupport::TestCase

Constant Summary collapse

Assertion =
Minitest::Assertion

Constants included from ActiveSupport::Testing::Assertions

ActiveSupport::Testing::Assertions::UNTRACKED

Class Method Summary collapse

Methods included from ActiveSupport::Testing::Declarative

test

Methods included from ActiveSupport::Testing::FileFixtures

#file_fixture

Methods included from Concern

#append_features, #class_methods, extended, #included

Methods included from ActiveSupport::Testing::TimeHelpers

#after_teardown, #freeze_time, #travel, #travel_back, #travel_to

Methods included from ActiveSupport::Testing::Deprecation

#assert_deprecated, #assert_not_deprecated, #collect_deprecations

Methods included from ActiveSupport::Testing::Assertions

#assert_changes, #assert_difference, #assert_no_changes, #assert_no_difference, #assert_not, #assert_nothing_raised

Methods included from ActiveSupport::Testing::TaggedLogging

#before_setup

Methods included from ActiveSupport::Testing::SetupAndTeardown

#after_teardown, #before_setup, prepended

Class Method Details

.test_orderObject

Returns the order in which test cases are run.

ActiveSupport::TestCase.test_order # => :random

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



39
40
41
# File 'lib/active_support/test_case.rb', line 39

def test_order
  ActiveSupport.test_order ||= :random
end

.test_order=(new_order) ⇒ Object

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)



29
30
31
# File 'lib/active_support/test_case.rb', line 29

def test_order=(new_order)
  ActiveSupport.test_order = new_order
end