Class: Test::Unit::TestSuiteAdapter
- Defined in:
- lib/spec/interop/test/unit/testsuite_adapter.rb
Instance Attribute Summary collapse
-
#example_group ⇒ Object
readonly
Returns the value of attribute example_group.
-
#examples ⇒ Object
(also: #tests)
readonly
Returns the value of attribute examples.
Instance Method Summary collapse
- #delete(example) ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(example_group) ⇒ TestSuiteAdapter
constructor
A new instance of TestSuiteAdapter.
- #name ⇒ Object
- #run(*args) ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize(example_group) ⇒ TestSuiteAdapter
Returns a new instance of TestSuiteAdapter.
8 9 10 11 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 8 def initialize(example_group) @example_group = example_group @examples = example_group.examples end |
Instance Attribute Details
#example_group ⇒ Object (readonly)
Returns the value of attribute example_group.
6 7 8 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 6 def example_group @example_group end |
#examples ⇒ Object (readonly) Also known as: tests
Returns the value of attribute examples.
6 7 8 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 6 def examples @examples end |
Instance Method Details
#delete(example) ⇒ Object
26 27 28 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 26 def delete(example) examples.delete example end |
#empty? ⇒ Boolean
30 31 32 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 30 def empty? examples.empty? end |
#name ⇒ Object
13 14 15 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 13 def name example_group.description end |
#run(*args) ⇒ Object
17 18 19 20 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 17 def run(*args) return true unless args.empty? example_group.run(Spec::Runner.) end |
#size ⇒ Object
22 23 24 |
# File 'lib/spec/interop/test/unit/testsuite_adapter.rb', line 22 def size example_group.number_of_examples end |