Class: Flatware::Cucumber::Runtime
- Inherits:
-
Cucumber::Runtime
- Object
- Cucumber::Runtime
- Flatware::Cucumber::Runtime
- Defined in:
- lib/flatware/cucumber/runtime.rb
Instance Attribute Summary collapse
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#err ⇒ Object
readonly
Returns the value of attribute err.
-
#loader ⇒ Object
Returns the value of attribute loader.
-
#out ⇒ Object
readonly
Returns the value of attribute out.
-
#visitor ⇒ Object
readonly
Returns the value of attribute visitor.
Instance Method Summary collapse
- #default_configuration ⇒ Object
-
#initialize(out = StringIO.new, err = out) ⇒ Runtime
constructor
A new instance of Runtime.
- #run(feature_files = [], options = []) ⇒ Object
Constructor Details
#initialize(out = StringIO.new, err = out) ⇒ Runtime
11 12 13 14 15 16 |
# File 'lib/flatware/cucumber/runtime.rb', line 11 def initialize(out=StringIO.new, err=out) @out, @err = out, err super(default_configuration) load_step_definitions @results = Results.new(configuration) end |
Instance Attribute Details
#configuration ⇒ Object
Returns the value of attribute configuration.
7 8 9 |
# File 'lib/flatware/cucumber/runtime.rb', line 7 def configuration @configuration end |
#err ⇒ Object (readonly)
Returns the value of attribute err.
8 9 10 |
# File 'lib/flatware/cucumber/runtime.rb', line 8 def err @err end |
#loader ⇒ Object
Returns the value of attribute loader.
7 8 9 |
# File 'lib/flatware/cucumber/runtime.rb', line 7 def loader @loader end |
#out ⇒ Object (readonly)
Returns the value of attribute out.
8 9 10 |
# File 'lib/flatware/cucumber/runtime.rb', line 8 def out @out end |
#visitor ⇒ Object (readonly)
Returns the value of attribute visitor.
9 10 11 |
# File 'lib/flatware/cucumber/runtime.rb', line 9 def visitor @visitor end |
Instance Method Details
#default_configuration ⇒ Object
18 19 20 21 22 |
# File 'lib/flatware/cucumber/runtime.rb', line 18 def default_configuration config = ::Cucumber::Cli::Configuration.new config.parse! [] config end |
#run(feature_files = [], options = []) ⇒ Object
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/flatware/cucumber/runtime.rb', line 24 def run(feature_files=[], =[]) @loader = nil = Array(feature_files) + %w[--format Flatware::Cucumber::Formatter] + configure(::Cucumber::Cli::Main.new(, out, err).configuration) self.visitor = configuration.build_tree_walker(self) visitor.visit_features(features) results end |