search for: validationexcept

Displaying 1 result from an estimated 1 matches for "validationexcept".

2006 Aug 15
7
Trying to Overide Class Object Methdos For Testing
...ValidationMaster class definition to take care of this. But then I thought, HEY, within each test I can open up the singleton class for the ValidationMaster class object. Whoo hoo, I''m in charge now! def test_stuff class << ValidationMaster def validate(params) raise ValidationException end end vm = ValidationMaster.new vm.validate("Jeff") end But, when I run my test, the exception is not getting thrown. The methods I''ve defined in the Mock are all working right, but it''s somehow not seeing the override within test_stuff. Am I mistake...