search for: validation_mast

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

Did you mean: validation_master
2006 Aug 15
7
Trying to Overide Class Object Methdos For Testing
...success, raises Exception # on failure end end Okay, so when I''m running my functional tests within rails, I want to be able to control how the validate(params) method behaves. So, I''ve created a ValidationMaster class definition and put it in RAILS_ROOT/test/mocks/test/validation_master.rb The methods I''ve defined there seem to be correctly overriding those of the original class definition. Now here is where I''m having problems. Within certain functional tests, I want validate(params) to return true. Other times I want it to fail and throw an exception....