From: WATANABE Hirofumi Date: 2002-08-08T15:37:28+09:00 Subject: Re: how do i mock the presence / absence of a constant w/out getting warnings? Hi, Patrick May writes: > I need to write tests for some behavior that needs to check a > constant: > > if (MOD_RUBY) > .... do stuff > else > .... do something else > end If you want to judge whether it is called from mod_ruby, you can use `defined?' . if defined? MOD_RUBY .... do stuff else .... do something else end -- eban