search for: assert_attribute_requir

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

2006 Jun 13
3
Dynamic determination of class under test...
...A-Z][a-z_]*)Test/.match(klass.to_s) $1 # <----- Now I have a string, not a Class, obviously # Of course I need a more complete alogrithm here, but I''d like to # to get the base case working first, do I need to use one of the # eval-type functions? end def assert_attribute_required(field) @non_inserted_fixture[field]=nil obj = @klass.new(@non_inserted_fixture) # <---- Now I need a Class object assert_not_valid obj assert obj.errors.invalid?(field) end Thank you. Eric