diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-10 00:36:23 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-10 00:36:23 +0000 |
commit | 651ea0d39c5c766ffb2abc8330fd6c6f88125720 (patch) | |
tree | 8e612b7bae9b7890536c5009f0e2fd1c5c3c1f5a /actionpack/lib | |
parent | 7ece0e166d7e65eeaeca5138b7ef0353c598bf95 (diff) | |
download | rails-651ea0d39c5c766ffb2abc8330fd6c6f88125720.tar.gz rails-651ea0d39c5c766ffb2abc8330fd6c6f88125720.tar.bz2 rails-651ea0d39c5c766ffb2abc8330fd6c6f88125720.zip |
Added assigns shortcut for @response.template.assigns to controller test cases [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/test_process.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/test_process.rb b/actionpack/lib/action_controller/test_process.rb index 3223da198c..e3ab045a12 100644 --- a/actionpack/lib/action_controller/test_process.rb +++ b/actionpack/lib/action_controller/test_process.rb @@ -277,6 +277,10 @@ module Test get(@response.redirected_to.delete(:action), @response.redirected_to.stringify_keys) end - end + + def assigns(name) + @response.template.assigns[name.to_s] + end + end end end
\ No newline at end of file |