The account variable is populated by a before filter in
application.rb.
When I try to test this though, I keep receiving a nil object error.
It seems to be that the test does not recognise the before filter and
therefore cannot create the object.
How do I make my test recognise the account variable?
The account variable is populated by a before filter in
application.rb.
When I try to test this though, I keep receiving a nil object error.
It seems to be that the test does not recognise the before filter and
therefore cannot create the object.
How do I make my test recognise the account variable?
Thanks in advance.
Robin
>
If it's a functional test, the filter will be run (assuming it's being
called), so there's probably some other problem. You can try putting a
logger.debug "this has been run and @account = #{@account.inspect}" in
the filter, and then checking the logs, or a: p assigns(:account).
Hope this helps
Chris