README.rdoc in lazy_const-0.1.1 vs README.rdoc in lazy_const-0.1.2

- old
+ new

@@ -6,10 +6,12 @@ gem 'lazy_const' == Example +=== Basic Usage + class Group extend LazyConst lazy_const :EVERYONE do new("Everyone") end @@ -30,9 +32,27 @@ Group.EVERYONE.add_user(user) user end end +=== Testing with RSpec + +spec/spec_helper.rb: + require 'lazy_const/spec' + +lib/some_class.rb: + class SomeClass + extend LazyConst + lazy_const :IMPORTANT_INSTACE do + new(:hotness) + end + end + +spec/some_spec.rb: + describe MyClass do + defines_const :IMPORTANT_INSTANCE + # ... + end == Contributing to lazy_const * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet. * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.