I am trying to test my application_helper methods, and some of them are
calling ApplicationController methods
class ApplicationHelperTest < Test::Unit::TestCase
…
test ‘test_copyrights’ do
assert_equal @subdomain[:name], copyright
end
class ApplicationController < ActionController::Base
helper_method :current_subdomain
def current_subdomain
…
end
…
end
but the test is failing :
NameError: undefined local variable or method `current_subdomain’
how can I test it ? ( where… in unit/functional/integration test ?
and
how to access the ApplicationController methods ?)
thanks for feedback