Aaaand, nevermind. I was loading fixtures before all of my required libraries 
were loaded in my tests. That makes me feel a lot better, since I find it less 
confusing to find that I made a mistake in my library load order than to think 
that such a minor change introduced such an obscure bug. :)

On Sep 8, 2010, at 2:58 PM, Ernie Miller wrote:

> Hey all,
> 
> In troubleshooting a failing test for MetaSearch against 3-0-stable, I came 
> across some undesirable (from my side, anyway) behavior in 
> http://github.com/rails/rails/commit/bf87528b53f1422708ec0188d126cfca824ddc5c.
> 
> A simple one-liner, it would appear, but AR::Base implements 
> before_remove_const to do a bit of scoped method cleanup... It's the only 
> thing I can see that might cause the problem, which is:
> 
> When accessing an AR::Base subclass via a reflection's klass accessor, it 
> seems as though class_attributes which are set up via macros 
> (attr_unsearchable in the MetaSearch case, but I also checked with 
> attr_protected) do not have their values. Commenting that single line:
> 
>       constantize(const).before_remove_const if 
> constantize(const).respond_to?(:before_remove_const)
> 
> will cause the failures to come and go at will, but removing the only 
> before_remove_const method I can find, in AR::Base, will not get the failures 
> to stop.
> 
> This is with Ruby 1.9.2-p0.
> 
> Any insights (or even confirmations I'm not insane) would be appreciated. :)
> 
> -Ernie
> 
> -- 
> Ernie Miller
> http://metautonomo.us
> http://github.com/ernie
> http://twitter.com/erniemiller
> 

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-c...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to