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_helper.rb
Spec::Runner.configure do |config|
# ...
config.include DescribeModelAttributeSpecHelper, :type => :model
end
Zach
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
module:
$ script/spec spec/models/property_spec.rb
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/
active_support/dependencies.rb:278:in `load_missing_constant':
uninitialized constant ModelSpeccer (NameError)
Any suggestions for how to correct this? Thanks!
Nick
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users