Module: Cucumber::Runtime::InjectableFeatures

Included in:
Cucumber::Runtime
Defined in:
lib/test_queue/runner/cucumber.rb

Overview

Without this module, Runtime#features would load all features specified on the command line. We want to avoid that and load only the features each worker needs ourselves, so we override the default behavior to let us put our iterator in place without loading any features directly.

Instance Method Summary collapse

Instance Method Details

#featuresObject



27
28
29
30
31
# File 'lib/test_queue/runner/cucumber.rb', line 27

def features
  return @features if defined?(@features)

  super
end

#features=(iterator) ⇒ Object



33
34
35
36
# File 'lib/test_queue/runner/cucumber.rb', line 33

def features=(iterator)
  @features = ::Cucumber::Ast::Features.new
  @features.features = iterator
end