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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
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.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedNov 27, '12 at 8:57a
activeNov 27, '12 at 8:57a
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Erwin: 1 post

People

Translate

site design / logo © 2021 Grokbase