[rspec-devel] [ rspec-Bugs-7206 ] spec crashes if Model class referenced in application.rb
noreply at rubyforge.org
noreply at rubyforge.org
Sun Dec 10 19:45:55 EST 2006
Bugs item #7206, was opened at 2006-12-10 18:06
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797
Category: rails plugin
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Nobody (None)
Assigned to: Nobody (None)
Summary: spec crashes if Model class referenced in application.rb
Initial Comment:
I'm using rspec 0.7.4 and the appropriate rails plugin. I'm running edge rails.
application.rb:
class ApplicationController < ActionController::Base
audit Address
end
where audit is provided by acts_as_audited plugin (http://opensoul.org/2006/7/21/acts_as_audited).
ANY spec will crash with an error /Users/me/Website/theproject/config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:246:in `load_missing_constant': Expected /Users/me/Website/theproject/config/../app/models/address.rb to define Address (LoadError)
If I comment out the audit declaration, the spec runs and passes as expected.
----------------------------------------------------------------------
>Comment By: Aslak Hellesøy (aslak_hellesoy)
Date: 2006-12-10 19:45
Message:
Can you confirm that this is an RSpec problem? That is, if you write an equivalent Test::Unit test, does the test pass?
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=3149&aid=7206&group_id=797
More information about the rspec-devel
mailing list