Class: Ruptr::Compat
- Inherits:
-
Object
show all
- Defined in:
- lib/ruptr/rspec.rb,
lib/ruptr/compat.rb,
lib/ruptr/autorun.rb,
lib/ruptr/minitest.rb,
lib/ruptr/testunit.rb,
lib/ruptr/rspec/configuration.rb,
lib/ruptr/rspec/example_group.rb
Defined Under Namespace
Classes: Minitest, RSpec, TestUnit
Instance Method Summary
collapse
Instance Method Details
#adapted_test_suite ⇒ Object
9
10
11
|
# File 'lib/ruptr/compat.rb', line 9
def adapted_test_suite
filter_test_group(TestSuite.new.tap { |ts| ts.add_test_subgroup(adapted_test_group) })
end
|
#default_project_load_paths ⇒ Object
18
|
# File 'lib/ruptr/compat.rb', line 18
def default_project_load_paths = []
|
#default_project_test_globs ⇒ Object
20
|
# File 'lib/ruptr/compat.rb', line 20
def default_project_test_globs = []
|
#each_default_project_test_file(project_path) ⇒ Object
22
23
24
25
|
# File 'lib/ruptr/compat.rb', line 22
def each_default_project_test_file(project_path, &)
return to_enum(__method__, project_path) unless block_given?
project_path.glob(default_project_test_globs, &)
end
|
#filter_test_group(tg) ⇒ Object
7
|
# File 'lib/ruptr/compat.rb', line 7
def filter_test_group(tg) = tg
|
#finalize_configuration! ⇒ Object
16
|
# File 'lib/ruptr/compat.rb', line 16
def finalize_configuration! = nil
|
#global_install! ⇒ Object
13
|
# File 'lib/ruptr/compat.rb', line 13
def global_install! = nil
|
#global_monkey_patch! ⇒ Object
15
|
# File 'lib/ruptr/compat.rb', line 15
def global_monkey_patch! = nil
|
#global_uninstall! ⇒ Object
14
|
# File 'lib/ruptr/compat.rb', line 14
def global_uninstall! = nil
|
#prepare_autorun!(test_suite = Ruptr::TestSuite.global_autorun_test_suite) ⇒ Object
#schedule_autorun! ⇒ Object
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/ruptr/autorun.rb', line 13
def schedule_autorun!
return if @autorun_scheduled
return unless @autorun_test_suite
@autorun_test_suite.run_on_exit!
Ruptr.at_normal_exit do
finalize_configuration!
@autorun_test_suite.add_test_subgroup(adapted_test_group)
end
@autorun_scheduled = true
end
|