Class: RubyUnit::TestSet
- Inherits:
-
Object
- Object
- RubyUnit::TestSet
- Defined in:
- lib/RubyUnit/TestSet.rb
Overview
Test Sets are a collection of Test Cases
Direct Known Subclasses
Class Method Summary collapse
-
.type ⇒ Object
Defining type of files includes for RubyUnit::TestSuite used with –debug.
Instance Method Summary collapse
-
#import(test_cases) ⇒ Object
Import the test cases for this test set.
-
#initialize(test_cases) ⇒ TestSet
constructor
Create a test set and import test cases.
Constructor Details
#initialize(test_cases) ⇒ TestSet
Create a test set and import test cases.
7 8 9 10 |
# File 'lib/RubyUnit/TestSet.rb', line 7 def initialize test_cases $:.unshift '.' unless $:.include? '.' import test_cases end |
Class Method Details
.type ⇒ Object
Defining type of files includes for RubyUnit::TestSuite used with –debug
24 25 26 |
# File 'lib/RubyUnit/TestSet.rb', line 24 def self.type 'Test Case' end |
Instance Method Details
#import(test_cases) ⇒ Object
Import the test cases for this test set
14 15 16 17 18 19 20 |
# File 'lib/RubyUnit/TestSet.rb', line 14 def import test_cases raise TypeError, "File list must be an Array, got #{test_cases.class}" unless test_cases.is_a? Array test_cases.each do |test_case| puts "%20s : %s" % ['Adding ' + self.class.type, test_case] if RubyUnit.debug require test_case end end |