Erwin
2012-Nov-27 07:04 UTC
Rails 3.2 - test for application_helper.rb fails when trying to access application_controller method
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
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/_D3E3it1abYJ.
For more options, visit https://groups.google.com/groups/opt_out.