Class: Cuporter::Node::Types::Feature

Inherits:
NodeBase
  • Object
show all
Includes:
Cuporter::Node::Tagged
Defined in:
lib/cuporter/node/types.rb

Instance Attribute Summary

Attributes included from Cuporter::Node::Tagged

#filter

Instance Method Summary collapse

Methods included from Cuporter::Node::Tagged

#filter_child, #has_tags?, #tags

Instance Method Details

#<=>(other) ⇒ Object

sort on: file path, name, substring of name after any ‘:’



117
118
119
120
121
122
123
# File 'lib/cuporter/node/types.rb', line 117

def <=>(other)
  if other.respond_to?(:file_path)
    file_path <=> other.file_path
  else
    super(other)
  end
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


125
126
127
128
129
130
# File 'lib/cuporter/node/types.rb', line 125

def eql?(other)
  if other.respond_to? :file_path
    return false if file_path != other.file_path
  end
  super(other)
end

#file_nameObject



112
113
114
# File 'lib/cuporter/node/types.rb', line 112

def file_name
  file_path.split(/\//).last
end

#file_pathObject



108
109
110
# File 'lib/cuporter/node/types.rb', line 108

def file_path
  self["file_path"]
end

#scenario_outline_node(scenario_outline) ⇒ Object



104
105
106
# File 'lib/cuporter/node/types.rb', line 104

def scenario_outline_node(scenario_outline)
  at("scenario_outline[cuke_name='#{scenario_outline[:cuke_name]}']")
end