Class: Dataset::TestSuite
- Inherits:
-
Object
- Object
- Dataset::TestSuite
show all
- Defined in:
- lib/dataset/extensions/test_unit.rb
Overview
Instance Method Summary
collapse
Constructor Details
#initialize(suite, test_class) ⇒ TestSuite
3
4
5
6
|
# File 'lib/dataset/extensions/test_unit.rb', line 3
def initialize(suite, test_class)
@suite = suite
@test_class = test_class
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_symbol, *args) ⇒ Object
20
21
22
|
# File 'lib/dataset/extensions/test_unit.rb', line 20
def method_missing(method_symbol, *args)
@suite.send(method_symbol, *args)
end
|
Instance Method Details
#dataset_session ⇒ Object
8
9
10
|
# File 'lib/dataset/extensions/test_unit.rb', line 8
def dataset_session
@test_class.dataset_session
end
|
#run(result, &progress_block) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/dataset/extensions/test_unit.rb', line 12
def run(result, &progress_block)
if dataset_session
load = dataset_session.load_datasets_for(@test_class)
@suite.tests.each { |e| e.extend_from_dataset_load(load) }
end
@suite.run(result, &progress_block)
end
|