diff options
author | Mikel Lindsaar <raasdnil@gmail.com> | 2010-04-25 17:07:55 +1000 |
---|---|---|
committer | Mikel Lindsaar <raasdnil@gmail.com> | 2010-04-25 17:07:55 +1000 |
commit | e1b255aca456a5b456111b09237805fd32d15111 (patch) | |
tree | a87c8b8989449a9dbdf1c6897901f6957ec021dc /actionpack/test/controller/test_test.rb | |
parent | 60ab54113fa833a1258d687673561b9474964149 (diff) | |
parent | a5955196f2ed8a69c49a1a8c0c617ab91cb8d716 (diff) | |
download | rails-e1b255aca456a5b456111b09237805fd32d15111.tar.gz rails-e1b255aca456a5b456111b09237805fd32d15111.tar.bz2 rails-e1b255aca456a5b456111b09237805fd32d15111.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/test/controller/test_test.rb')
-rw-r--r-- | actionpack/test/controller/test_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_test.rb b/actionpack/test/controller/test_test.rb index 6f1ce2fef7..f9fc7a0976 100644 --- a/actionpack/test/controller/test_test.rb +++ b/actionpack/test/controller/test_test.rb @@ -113,6 +113,11 @@ XML render :nothing => true end + def test_assigns + @foo = "foo" + render :nothing => true + end + private def rescue_action(e) raise e @@ -230,6 +235,17 @@ XML assert_equal "OK", @response.body end + def test_assigns + process :test_assigns + # assigns can be accessed using assigns(key) + # or assigns[key], where key is a string or + # a symbol + assert_equal "foo", assigns(:foo) + assert_equal "foo", assigns("foo") + assert_equal "foo", assigns[:foo] + assert_equal "foo", assigns["foo"] + end + def test_assert_tag_tag process :test_html_output |