Sha256: 55685bcd0457c2e5ed4d4010c12d0607ee70b50225fecf101292df687b66eeb6
Contents?: true
Size: 1.42 KB
Versions: 1
Compression:
Stored size: 1.42 KB
Contents
require 'cucumber/core/ast/location' require 'cucumber/core/ast/describes_itself' require 'cucumber/core/ast/step' module Cucumber module Core module Ast class OutlineStep include HasLocation include DescribesItself attr_reader :gherkin_statement, :language, :location, :comments, :keyword, :name, :multiline_arg def initialize(gherkin_statement, language, location, comments, keyword, name, multiline_arg) @gherkin_statement, @language, @location, @comments, @keyword, @name, @multiline_arg = gherkin_statement, language, location, comments, keyword, name, multiline_arg @language || raise("Language is required!") end def to_step(row) Ast::ExpandedOutlineStep.new(self, gherkin_statement, language, row.location, comments, keyword, row.expand(name), replace_multiline_arg(row)) end def inspect keyword_and_name = [keyword, name].join(": ") %{#<#{self.class} "#{keyword_and_name}" (#{location})>} end private def description_for_visitors :outline_step end def children # TODO remove duplication with Step # TODO spec [@multiline_arg] end def replace_multiline_arg(example_row) return unless multiline_arg multiline_arg.map { |cell| example_row.expand(cell) } end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cucumber-core-1.2.0 | lib/cucumber/core/ast/outline_step.rb |