I am trying to write some functional tests in my rails application, and in application_controller.rb I have this:
before_filter :current_account
def current_account
@current_account ||= Account.find_by_subdomain!(request.subdomians.first)
end
When performing tests, it request.subdomainsdoes not contain valid subdomains that I am looking for, and makes it impossible to run any functional tests.
Is it possible to mute a method current_accountor make fun of an object request.subdomains?
source
share