[rspec-users] Application-wide spec_helper method
nick at deadorange.com
Fri Aug 29 22:40:25 EDT 2008
On 2008-08-28, at 13:27, Zach Dennis wrote:
> You can put it in a module and include it for model specs in
> Spec::Runner.configure do |config|
> # ...
> config.include DescribeModelAttributeSpecHelper, :type => :model
Hi Zach. I put the methods into the module "ModelSpeccer" in lib/
ModelSpeccer.rb and then added this to spec_helper.rb :
config.include ModelSpeccer, :type => :model
Unfortunately though, when I run my specs, Ruby isn't finding the
$ script/spec spec/models/property_spec.rb
uninitialized constant ModelSpeccer (NameError)
Any suggestions for how to correct this? Thanks!
More information about the rspec-users