Module: ParallelTests::Extensions

Includes:
Retries
Included in:
ParallelTests
Defined in:
lib/parallel_tests/extensions.rb,
lib/parallel_tests/extensions/version.rb

Constant Summary collapse

VERSION =
'0.1.0'

Instance Method Summary collapse

Methods included from Retries

#retry_failed_tests

Instance Method Details

#after_tests(&block) ⇒ Object



62
63
64
65
66
67
68
# File 'lib/parallel_tests/extensions.rb', line 62

def after_tests(&block)
  if is_running?
    @afters ||= []
    @afters << block
    install_after_hook unless @after_hook_installed
  end
end

#is_running?Boolean

Returns whether or not parallel test is running.

Examples:

ParallelTests.is_running?

Returns:

  • (Boolean)

    whether or not parallel test is running



58
59
60
# File 'lib/parallel_tests/extensions.rb', line 58

def is_running?
  ENV.has_key?('TEST_ENV_NUMBER')
end