Testing subdomains as account keys

Hello,

I'm just starting to write tests for my apps (I've really been putting it off). Im trying to test the following code but I'm getting an error "undefined local variable or method `current_account'" in a functional test.

My codes is @ application_controller.rb · GitHub

Basically, how can I get access to the current_account method in my functional test?

Thanks

I think I've got it now. I'm now calling @controller.send (:current_account) rather than current_account. I'm using send because the method is private.