Forum: Ruby on Rails ActionController::TestRequest bug?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
pk16 (Guest)
on 2008-12-14 20:11
(Received via mailing list)
Hi, while starting to setup functional tests for my application I
received the following error:

NoMethodError: undefined method `server_name' for
#<ActionController::TestRequest

which is coming from an instance variable I'm setting up in my
application controller.

@domain = Domain.find_or_create_by_name(request.server_name)

I'm using rails 2.0.2, any guidance would be appreciated.
This topic is locked and can not be replied to.