crowbar/barclamp-test — pull request #21 by cloudedge (2013-01-30 03:41:10+00:00)
Title: Refactor NodeAttrib to be AttribInstance instead [2/2]

This changes was taken because we have a neeed to subclass
attributes in a consistent and predictable way within barclamps.

The previous model (still partially implemented in BarclampAttribs)
was trying to split attribute data into node and barclamp types.

That approach is confusing and difficult to subclass consistently.

In the new model (see the doc/devguide/model directory) only have one
place where attrib data is expected.

This allows us to store attrib data for each node AND also for
the barclamp instance too (when node=0 then the data is barclamp instance data).

The next step in the process is to move the BarclampAttrib class into
AttribInstance. That should be easier because it is less used.

Added function notes:
* There is a small commit in the middle in which I added some
BDD debugging help. This commit allows users to add tags to logs.
* The Proposal Tests were failing - I've removed them while we refactor

.../app/models/test/attrib_instance_test.rb | 22 ++++++---
.../test/unit/attrib_instance_test_model_test.rb | 52 ++++++++++++++++++++
2 files changed, 66 insertions(+), 8 deletions(-)

Crowbar-Pull-ID: 88c48f4ee579087c974bd5cf1813c795e8781470

Crowbar-Release: development