In Rails, Helpers are modules
which are directly accessible in immediate view but in order to access them in a controller you need use include
directive to specify the module explicitly.
In your case, test
is an instance method. If you wish to access it in a class then either you need to include the module as specified above.
BUT if you want to access it using require 'number_helper'
then define test
as a class method(def self.test
) and access it in controller as NumberHelper::test
.