Class: InfinityTest::TestLibrary::TestUnit
Instance Attribute Summary
#application, #message, #rubies, #specific_options, #test_pattern
Instance Method Summary
collapse
#all_files, create_accessors, #create_pattern_instance_variables, parse_results, #test_message
Methods included from Builder
#construct_command, #construct_commands, #resolve_options, #run_with_bundler!, #run_without_bundler!
#environments
Methods included from BinaryPath
#have_binary?, included, #print_message, #rvm_bin_path, #search_binary
Constructor Details
#initialize(options = {}) ⇒ TestUnit
Returns a new instance of TestUnit.
7
8
9
10
|
# File 'lib/infinity_test/test_library/test_unit.rb', line 7
def initialize(options={})
super(options)
@test_pattern = 'test/**/*_test.rb'
end
|
Instance Method Details
#construct_rubies_commands(file = nil) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/infinity_test/test_library/test_unit.rb', line 12
def construct_rubies_commands(file=nil)
command = {}
environments do |environment, ruby_version|
command[ruby_version] = construct_command(
:for => ruby_version,
:load_path => 'lib:test',
:file => file,
:environment => environment,
:skip_binary? => true)
end
command
end
|
#decide_files(file) ⇒ Object
29
30
31
32
|
# File 'lib/infinity_test/test_library/test_unit.rb', line 29
def decide_files(file)
return file if file
test_files
end
|
#failure? ⇒ Boolean
42
43
44
|
# File 'lib/infinity_test/test_library/test_unit.rb', line 42
def failure?
@failures > 0 or @errors > 0
end
|
#pending? ⇒ Boolean
46
47
48
|
# File 'lib/infinity_test/test_library/test_unit.rb', line 46
def pending?
false end
|
#test_files ⇒ Object
25
26
27
|
# File 'lib/infinity_test/test_library/test_unit.rb', line 25
def test_files
super.split.unshift(test_loader).sort.join(' ')
end
|
#test_loader ⇒ Object
35
36
37
38
39
40
|
# File 'lib/infinity_test/test_library/test_unit.rb', line 35
def test_loader
$LOAD_PATH.each do |path|
file_path = File.join(path, "infinity_test/test_unit_loader.rb")
return file_path if File.exist?(file_path)
end
end
|