Sha256: eaacc280b217cba88d265a3d82717277b352fe246977f3fc91e23e5c1c5c786f
Contents?: true
Size: 955 Bytes
Versions: 19
Compression:
Stored size: 955 Bytes
Contents
module Cucumber module Ast class Examples #:nodoc: def initialize(comment, line, keyword, name, outline_table) @comment, @keyword, @name, @outline_table = comment, keyword, name, outline_table end def accept(visitor) return if Cucumber.wants_to_quit visitor.visit_comment(@comment) unless @comment.empty? visitor.visit_examples_name(@keyword, @name) visitor.visit_outline_table(@outline_table) end def skip_invoke! @outline_table.skip_invoke! end def each_example_row(&proc) @outline_table.cells_rows[1..-1].each(&proc) end def failed? @outline_table.cells_rows[1..-1].select{|row| row.failed?}.any? end def to_sexp sexp = [:examples, @keyword, @name] comment = @comment.to_sexp sexp += [comment] if comment sexp += [@outline_table.to_sexp] sexp end end end end
Version data entries
19 entries across 19 versions & 5 rubygems