Sha256: 97f6825e98780107f06cfc75384bf9fb6593b74d2efda94f4057ae4d931dc989
Contents?: true
Size: 1.11 KB
Versions: 2
Compression:
Stored size: 1.11 KB
Contents
# encoding: UTF-8 module CucumberMonitor class Base def self.path CucumberMonitor.path end def self.features_path "#{path}/features" end def self.cucumber_output_file "#{path}/tmp/cucumber.out" end def locate "Printing: #{I18n.t("feature")}" end def files collection = [] dir_entries = Dir.entries(self.class.features_path) search_and_include_features(dir_entries) end def search_and_include_features(dir_entries, collection=[]) dir_entries.each do |entrie| if entrie.include?('.feature') collection << entrie end end collection end def features collection = [] files.each do |file| collection << CucumberMonitor::FeatureFile.new(file) end collection end def search(criteria) results = [] features.each do |feature| feature.scenarios.each do |scenario| scenario.steps.each do |step| results << step if step.description.include?(criteria) end end end results end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cucumber_monitor-0.0.6 | lib/cucumber_monitor/base.rb |
cucumber_monitor-0.0.5 | lib/cucumber_monitor/base.rb |