Never mind, i'm an idiot, the problem was that i broke my Property class with the has_many_polymorphs declaration, so the spec couldn't load it. Sorry!<br><br><div><span class="gmail_quote">On 27/02/2008, <b class="gmail_sendername">Max Williams</b> <<a href="mailto:toastkid.williams@gmail.com">toastkid.williams@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have a class Property that was testing fine until i added the following to it: <br><br> has_many_polymorphs :labelled, <br> :from => [:instructional_objects, :lessons, :courses], <br> :through => :labels,<br>
:dependent => :destroy<br><br>(in other words, 'labels' is a join table through which various objects can be labelled with a property)<br><br>Now my spec file crashes, saying that Property isn't defined in property.rb: does anyone know what's gone wrong here?<br>
<br>/home/jars/rails/lesson_planner/branches/max/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:249:in `load_missing_constant': Expected /home/jars/rails/lesson_planner/branches/max/app/models/property.rb to define Property (LoadError)<br>
from /home/jars/rails/lesson_planner/branches/max/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:452:in `const_missing'<br> from /home/jars/rails/lesson_planner/branches/max/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing'<br>
from ./spec/models/property_spec.rb:3<br>...<br>
</blockquote></div><br>