Forum: RSpec Change cache_classes on the fly?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6663ba8c6b340de3046a0baff522bdde?d=identicon&s=25 tatyree (Guest)
on 2009-05-20 16:52
(Received via mailing list)
Strange request, I know...also seems pretty unlikely that it will
work, but:

Any thoughts on how I might change the setting on the fly (or stub
it)?  I'm stopping certain classes loading in production, and I'd like
to be able to test the behavior without having to manually change the
setting in test.rb.

Thanks,
Todd
C694a032be7518a0d704318895f8fe1d?d=identicon&s=25 Ben Mabey (mabes)
on 2009-05-20 20:48
(Received via mailing list)
tatyree wrote:
>
>
Try changing the Rails.configuration.cache_classes setting at the
appropriate times...

-Ben
5d38ab152e1e3e219512a9859fcd93af?d=identicon&s=25 David Chelimsky (Guest)
on 2009-05-21 07:27
(Received via mailing list)
On Wed, May 20, 2009 at 6:01 AM, tatyree <tatyree@googlemail.com> wrote:
> Strange request, I know...also seems pretty unlikely that it will
> work, but:
>
> Any thoughts on how I might change the setting on the fly (or stub
> it)?  I'm stopping certain classes loading in production, and I'd like
> to be able to test the behavior without having to manually change the
> setting in test.rb.

Have you looked at the rails code that uses it? That's what you'd need
to look at to know what to stub.
This topic is locked and can not be replied to.