Displaying 1 result from an estimated 1 matches for "convert_classname".
2006 Jun 17
0
Some Rails and ZenTest questions... [long]
...to use the @controller_class_name variable in an
abstract intermediate class between ControllerTestCase and my test
cases to let Test::Rails::ControllerTestCase resolve the file->class
mapping. However this code is getting repetitive between controller
trees
def setup
return if convert_classname == File.basename
(__FILE__,"_abstract.rb")
@controller_class_name = File.basename
(__FILE__,"_test_abstract.rb").classify
super
end
def convert_classname
self.class.to_s.tabelize.singularize
end
Notice that none of the code is different for the differ...