[rspec-users] [RSpec] Dynamic reloading with Object.send(:remove_const)

Bruno Cardoso lists at ruby-forum.com
Wed Aug 4 12:41:58 EDT 2010


Hi,

I have a function that adds dynamic validations to my models. I use a
combination of ":remove_const" and "load" methods to reload the code
everytime I want to re-apply my dynamic validations. It seams RSpec has
some issues with this.

I posted here a simpler example code that shows what I mean:

http://pastie.org/private/ruvgxgipxfge6yzuudbq

Is it possible to test this with RSpec?

Regards
-- 
Posted via http://www.ruby-forum.com/.


More information about the rspec-users mailing list