Never mind, i&#39;m an idiot, the problem was that i broke my Property class with the has_many_polymorphs declaration, so the spec couldn&#39;t load it.&nbsp; Sorry!<br><br><div><span class="gmail_quote">On 27/02/2008, <b class="gmail_sendername">Max Williams</b> &lt;<a href="mailto:toastkid.williams@gmail.com">toastkid.williams@gmail.com</a>&gt; 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:&nbsp; <br><br>&nbsp; has_many_polymorphs :labelled, <br>&nbsp;&nbsp;&nbsp; :from =&gt; [:instructional_objects, :lessons, :courses], <br>&nbsp;&nbsp;&nbsp; :through =&gt; :labels,<br>

&nbsp;&nbsp;&nbsp; :dependent =&gt; :destroy<br><br>(in other words, &#39;labels&#39; 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&#39;t defined in property.rb:&nbsp; does anyone know what&#39;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&#39;: Expected /home/jars/rails/lesson_planner/branches/max/app/models/property.rb to define Property (LoadError)<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /home/jars/rails/lesson_planner/branches/max/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:452:in `const_missing&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from /home/jars/rails/lesson_planner/branches/max/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:464:in `const_missing&#39;<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from ./spec/models/property_spec.rb:3<br>...<br>
</blockquote></div><br>