Class: Cuporter::Node::Types::Report
- Defined in:
- lib/cuporter/node/types.rb
Instance Method Summary collapse
-
#defoliate! ⇒ Object
remove leaf nodes, i.e., the scenario and scenario outline children.
- #remove_files! ⇒ Object
- #remove_tags! ⇒ Object
- #tag_node(tag) ⇒ Object
Instance Method Details
#defoliate! ⇒ Object
remove leaf nodes, i.e., the scenario and scenario outline children
12 13 14 15 |
# File 'lib/cuporter/node/types.rb', line 12 def defoliate! leaves = search("feature > scenario, feature > scenario_outline") leaves.remove end |
#remove_files! ⇒ Object
17 18 19 |
# File 'lib/cuporter/node/types.rb', line 17 def remove_files! search(:feature).each {|f| f.delete('file_path') } end |
#remove_tags! ⇒ Object
21 22 23 |
# File 'lib/cuporter/node/types.rb', line 21 def search("*[@tags]").each {|e| e.delete('tags') } end |
#tag_node(tag) ⇒ Object
7 8 9 |
# File 'lib/cuporter/node/types.rb', line 7 def tag_node(tag) at("tag[cuke_name='#{tag}']") end |