Class: Cucumber::Ast::Scenario
- Inherits:
-
Object
- Object
- Cucumber::Ast::Scenario
- Includes:
- Testrail::Scenario
- Defined in:
- lib/cucumber_testrail/reopen_scenario.rb
Instance Method Summary collapse
-
#steps_as_string ⇒ Object
return the steps and as strings ready to write to the testcase.
- #tag_line ⇒ Object
Methods included from Testrail::Scenario
#ignore_testrail?, included, #is_manual?, #jira, #project, #skip_result?, #sub_section, #suite, #test_result, #testcase, #testrail_status, #testrail_tag, #testrail_test_report, #testrail_testcase, #testrun
Instance Method Details
#steps_as_string ⇒ Object
return the steps and as strings ready to write to the testcase
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/cucumber_testrail/reopen_scenario.rb', line 8 def steps_as_string to_sexp.select{|a| a[0]==:step_invocation}.map do |s| if s[4] ["#{s[2]}#{s[3]}"]+s[4].select{|e| e.is_a?(Array) && e[0]==:row}.map do |l| "| #{l.select{|e| e.is_a?(Array)}.map{|e| e[1]}.join(' | ')} |" end else "#{s[2]}#{s[3]}" end end.flatten.join("\n") end |
#tag_line ⇒ Object
20 21 22 |
# File 'lib/cucumber_testrail/reopen_scenario.rb', line 20 def tag_line line - 2 end |