Class: InfinityTest::TestLibrary::TestUnit
- Inherits:
-
InfinityTest::TestFramework
- Object
- InfinityTest::TestFramework
- InfinityTest::TestLibrary::TestUnit
- Defined in:
- lib/infinity_test/test_library/test_unit.rb
Instance Attribute Summary
Attributes inherited from InfinityTest::TestFramework
#application, #message, #rubies, #test_pattern
Instance Method Summary collapse
- #construct_rubies_commands(file = nil) ⇒ Object
- #failure? ⇒ Boolean
-
#initialize(options = {}) ⇒ TestUnit
constructor
A new instance of TestUnit.
- #pending? ⇒ Boolean
- #test_files ⇒ Object
- #test_loader ⇒ Object
Methods inherited from InfinityTest::TestFramework
#all_files, create_accessors, #create_pattern_instance_variables, #decide_files, parse_results, #test_message
Methods included from Builder
#construct_command, #construct_commands, #resolve_options, #run_with_bundler!, #run_without_bundler!
Methods included from Environment
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(={}) super() @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 |
#failure? ⇒ Boolean
36 37 38 |
# File 'lib/infinity_test/test_library/test_unit.rb', line 36 def failure? @failures > 0 or @errors > 0 end |
#pending? ⇒ Boolean
40 41 42 |
# File 'lib/infinity_test/test_library/test_unit.rb', line 40 def pending? false # Don't have pending in Test::Unit right?? #doubt 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
29 30 31 32 33 34 |
# File 'lib/infinity_test/test_library/test_unit.rb', line 29 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 |