Class: Lucid::Parser::SpecBuilder::ScenarioOutlineBuilder
- Defined in:
- lib/lucid/spec_builder.rb
Instance Method Summary collapse
- #add_child(child) ⇒ Object
- #add_examples(examples_section, node) ⇒ Object
- #children ⇒ Object
- #result(background, language, feature_tags) ⇒ Object
- #steps(language) ⇒ Object
Methods inherited from Spec
Constructor Details
This class inherits a constructor from Lucid::Parser::SpecBuilder::Spec
Instance Method Details
#add_child(child) ⇒ Object
257 258 259 |
# File 'lib/lucid/spec_builder.rb', line 257 def add_child(child) children << child end |
#add_examples(examples_section, node) ⇒ Object
248 249 250 251 |
# File 'lib/lucid/spec_builder.rb', line 248 def add_examples(examples_section, node) @examples_sections ||= [] @examples_sections << [examples_section, node] end |
#children ⇒ Object
261 262 263 |
# File 'lib/lucid/spec_builder.rb', line 261 def children @children ||= [] end |
#result(background, language, feature_tags) ⇒ Object
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/lucid/spec_builder.rb', line 230 def result(background, language, ) scenario_outline = Lucid::AST::ScenarioOutline.new( language, location, background, comment, , , node.keyword, node.name, node.description, steps(language), examples_sections ) scenario_outline.gherkin_statement(node) scenario_outline end |
#steps(language) ⇒ Object
253 254 255 |
# File 'lib/lucid/spec_builder.rb', line 253 def steps(language) children.map { |child| child.result(language) } end |