Class: CiderCI::RspecSupport::Collector
- Inherits:
-
Object
- Object
- CiderCI::RspecSupport::Collector
- Defined in:
- lib/cider_ci/rspec_support/collector.rb
Instance Attribute Summary collapse
-
#feature_tasks ⇒ Object
readonly
Returns the value of attribute feature_tasks.
-
#tasks ⇒ Object
readonly
Returns the value of attribute tasks.
Instance Method Summary collapse
- #example_started(notification) ⇒ Object
-
#initialize(_output) ⇒ Collector
constructor
A new instance of Collector.
- #parent_metadata(metadata) ⇒ Object
Constructor Details
#initialize(_output) ⇒ Collector
Returns a new instance of Collector.
13 14 15 16 17 |
# File 'lib/cider_ci/rspec_support/collector.rb', line 13 def initialize(_output) ::CiderCI::RspecSupport.collector = self @tasks = Set.new @feature_tasks = Set.new end |
Instance Attribute Details
#feature_tasks ⇒ Object (readonly)
Returns the value of attribute feature_tasks.
11 12 13 |
# File 'lib/cider_ci/rspec_support/collector.rb', line 11 def feature_tasks @feature_tasks end |
#tasks ⇒ Object (readonly)
Returns the value of attribute tasks.
10 11 12 |
# File 'lib/cider_ci/rspec_support/collector.rb', line 10 def tasks @tasks end |
Instance Method Details
#example_started(notification) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/cider_ci/rspec_support/collector.rb', line 27 def example_started(notification) = (notification.example.example_group.) task = Task.new(file_path: [:file_path], description: [:file_path] ) case [:type] when :feature @feature_tasks << task else @tasks << task end end |
#parent_metadata(metadata) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/cider_ci/rspec_support/collector.rb', line 19 def () if (pmd = [:parent_example_group]) (pmd) else end end |