Class: Test::Unit::TestSuiteAdapter

Inherits:
TestSuite
  • Object
show all
Defined in:
lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(example_group) ⇒ TestSuiteAdapter

Returns a new instance of TestSuiteAdapter.



6
7
8
9
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 6

def initialize(example_group)
  @example_group = example_group
  @examples = example_group.examples
end

Instance Attribute Details

#example_groupObject (readonly)

Returns the value of attribute example_group.



4
5
6
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 4

def example_group
  @example_group
end

#examplesObject (readonly) Also known as: tests

Returns the value of attribute examples.



4
5
6
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 4

def examples
  @examples
end

Instance Method Details

#delete(example) ⇒ Object



24
25
26
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 24

def delete(example)
  examples.delete example
end

#empty?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 28

def empty?
  examples.empty?
end

#nameObject



11
12
13
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 11

def name
  example_group.description
end

#run(*args) ⇒ Object



15
16
17
18
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 15

def run(*args)
  return true unless args.empty?
  example_group.run(Spec::Runner.options)
end

#sizeObject



20
21
22
# File 'lib/vendor/plugins/rspec/lib/spec/interop/test/unit/testsuite_adapter.rb', line 20

def size
  example_group.number_of_examples
end