HomePhorge

maint: relax spec test of resources
eba95ea88e89Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

maint: relax spec test of resources

The resource_spec performs some comparisons by using the equal_attributes_of
matcher. This is mostly correct, but considers some instance variables that are
of no consequence to the resource, e.g. @rstype. As a result, internal changes
to Puppet::Resource that may lead to this attribute not being set in a resource
that is generated from YAML would break this expectation:

expected
Foo::Bar[xyzzy]{:name=>"xyzzy", :one=>"test", :two=>"other"}
to equal attributes of
Foo::Bar[xyzzy]{:name=>"xyzzy", :one=>"test", :two=>"other"}

This is not only difficult to debug, it first and foremost misses the intention
of the example, which is only concerned with RAL attributes, not "internal"
instance variables.

Event Timeline

Felix Frank <Felix.Frank@Alumni.TU-Berlin.de> committed rPUeba95ea88e89: maint: relax spec test of resources (authored by Felix Frank <Felix.Frank@Alumni.TU-Berlin.de>).Apr 26 2014, 12:17 AM