On Sep 29, 2008, at 2:05 PM, Brice Figureau wrote:

>> Again, you can do '.should be_nil' here.
>>
>> And if you find that you'd like something like that but custom
>> (e.g., .should be_float), you can add new matchers to RSpec:
>>
>> http://tuples.us/2007/10/23/if-you-arent-writing-matchers-you-arent-using-rspec/
>
> Where should the matcher code be stored in the tree (in case I go  
> this way)?


Not really sure; I guess I'd make a spec/lib directory.  I assume  
RSpec has some kind of autoloading mechanism, if we store them in the  
right path.

 From the shape of the spec lib directory, you could probably create a  
lib/spec/matchers/ directory and put them in there, named appropriately.

Then just modify the spec_helper.rb file to add that lib dir to the  
search path.

-- 
God loved the birds and invented trees. Man loved the birds and
invented cages. -- Jacques Deval
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to