Class: Kymera::Cucumber::TestParser
- Inherits:
-
Object
- Object
- Kymera::Cucumber::TestParser
- Defined in:
- lib/kymera/cucumber/test_parser.rb
Instance Method Summary collapse
-
#initialize(tests, options) ⇒ TestParser
constructor
A new instance of TestParser.
- #parse_tests ⇒ Object
Constructor Details
#initialize(tests, options) ⇒ TestParser
Returns a new instance of TestParser.
8 9 10 11 |
# File 'lib/kymera/cucumber/test_parser.rb', line 8 def initialize(tests, ) @tests = tests @options = end |
Instance Method Details
#parse_tests ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/kymera/cucumber/test_parser.rb', line 13 def parse_tests tests = dry_run(["cucumber", @tests, '--dry-run -f DryRunFormatter', @options].compact.join(" ")).split("\n") refined_tests =[] tests.delete_at(0) if tests[0].downcase.include?('using') tests.each do |test| refined_tests << test.gsub('\\','/') end $stdout << "The number of scenarios found to be executed: #{refined_tests.count}" $stdout << "\n" refined_tests end |