On
http://github.com/rails/rails/blob/master/actionpack/lib/action_con...,
the docs say you can access assigns with
assigns(:key).
It turns out that you can actually access assigns in any of
these three ways:
assigns(:key)
assigns("key")
assigns["key"]
But you can not access assigns with assigns[:key].
Actually, you can use assigns[:key], but it always
returns nil, leading to false results in tests with no indication
that you're doing something wrong.
My thought is that if you can use strings or symbols with
assigns(...), you should probably be able to use
strings or symbols with assigns[...]. The alternative
would be to prevent access with keys (or warn in that case), but
that seems like overkill to me.
Here's a patch to handle the more flexible case:
http://github.com/dchelimsky/rails/commit/9531c36bbc681b5b905f695b8...