From: nobu.nokada@... Date: 2002-08-09T08:59:49+09:00 Subject: Re: Testing for mod_ruby (was "how do i mock the presence / absence of a constant w/out getting warnings?") Hi, At Fri, 9 Aug 2002 05:03:06 +0900, Patrick May wrote: > I am writing unit tested code which needs to behave differently > depending on whether MOD_RUBY is present or absent. Currently, such > behavior is near impossible to mock, b/c to ruby constants are exactly > that -- constant. I can't "undeclare" a top level constant to > teardown the MOD_RUBY tests. Use Module#remove_const. Object.module_eval {remove_const(:MOD_RUBY)} -- Nobu Nakada