itsme213 wrote: > Part of my unit tests need to define new classes to test the code I generate > for those newly defined classes. I'm not sure what's a good way to do this. > > Is > eval "class A < B; end" > a reasonable way to define these classes inside a test method? It's the > closest to what my "user code" will be doing. If so, how can I clean up at > the end of the test? const_set gives warnings. > > Or, should I be doing > c = Class.new > # do stuff with c I'd prefer this a lot over the above. You can still use const_set() though the redefinition warning won't go away.