lib/rspec-system/node.rb in rspec-system-1.7.1 vs lib/rspec-system/node.rb in rspec-system-2.0.0
- old
+ new
@@ -1,8 +1,12 @@
+require 'rspec-system'
+
module RSpecSystem
# This class represents a node in a nodeset
class Node
+ include RSpecSystem::InternalHelpers
+
# Static helper for generating a node direct from the hash returned by
# the nodeset YAML file.
#
# @param nodeset [RSpecSystem::Node] nodeset that this node belongs to
# @param k [String] name of node
@@ -74,8 +78,22 @@
# Return provider specific settings
#
# @return [Hash] provider specific settings
def provider_specifics
@provider_specifics
+ end
+
+ # Return name when stringified
+ #
+ # @return [String] name of node
+ def to_s
+ name
+ end
+
+ # Return name when inspected
+ #
+ # @return [String] name of node
+ def inspect
+ name
end
end
end