Sha256: c5fa70f5f429d328837dc8739d3433265071066ee7295bd8a31f4b410a106544

Contents?: true

Size: 660 Bytes

Versions: 3

Compression:

Stored size: 660 Bytes

Contents

# encoding: UTF-8

module CucumberMonitor

  class Context

    attr_accessor :name, :feature

    def initialize(name,feature)
      @name = name
      @feature = feature
    end

    def steps
      st = []
      started = false
      stopped = false
      record = false
      count = 0
      feature.lines.each_with_index do |line, i|
        if line.include?(I18n.t("background"))
          started = true
        end
        if started && !stopped
          st << Step.new(line.strip, self, i+1) unless (count == 0 || line.strip.blank?)
          stopped = true if line.strip.blank?
          count += 1
        end
      end
      st
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber_monitor-0.0.3 lib/cucumber_monitor/context.rb
cucumber_monitor-0.0.2 lib/cucumber_monitor/context.rb
cucumber_monitor-0.0.1 lib/cucumber_monitor/context.rb