moose/Moose — pull request #72 by drzigman (2014-06-20 16:42:52+00:00)
Title: Implemented Test::Moose lacks_attribute_ok

Introduces a new method into Test::Moose, lacks_attribute_ok

lacks_attribute_ok is simply a negated version of has_attribute_ok. I find myself needing this functionality especially when I am constructing objects with arguments that are not actually attributes (such as using a class method that will encrypt a password before storing it in the encrypted_password attribute, or any time BUILDARGS magic is happening).

POD has been added in lib/Test/Moose.pm

A test has been created in t/test_moose/test_moose_lacks_attribute_ok.t which implements tests for the below use cases
Object lacks an attribute that it actually lacks (Pass)
Object lacks an attribute that it actually has (Fail)
Extended Object lacks an attribute that the base object has (Fail)
Extended Object lacks an attribute that it actually has (Fail)
Extended Object lacks an attribute that it actually lacks (Pass)

I'm happy to make any changes you feel are needed, or discuss the efficacy and utility of this new method. Thanks for considering it!