From: patrick-may@... (Patrick May) Date: 2002-08-11T13:04:29+09:00 Subject: Re: Testing for mod_ruby (was "how do i mock the presence / absence of a constant w/out getting warnings?") Thanks for your suggestion, sorry it took me a while to respond. nobu.nokada@softhome.net wrote in message news:<200208082359.g78Nxnr19485@sharui.nakada.kanuma.tochigi.jp>... > Use Module#remove_const. > > Object.module_eval {remove_const(:MOD_RUBY)} Thanks, this worked for me. Unfortunately, after I did Object.const_set( :MOD_RUBY, true ) in the context of the test, the check in my code (different context): if (defined? MOD_RUBY) continued to be false. If I checked in the body of the test method, this check returned true. Is this the expected behaviour? I haven't investigated this to deeply, b/c I've been working on other problems and I've setup a work around for this issue. Thanks for your help, Patrick