diff options
author | Will Bryant <will.bryant@gmail.com> | 2011-10-15 22:38:28 +1300 |
---|---|---|
committer | Will Bryant <will.bryant@gmail.com> | 2012-02-18 23:41:07 +1300 |
commit | 185c3dbc6ab845edfc94e8d38ef5be11c417dd81 (patch) | |
tree | 627ba354ac149d5eec2ea29835c17398496c9a93 /actionpack/test | |
parent | 2f689d462d8e94365724c5575b14ab997e11bb43 (diff) | |
download | rails-185c3dbc6ab845edfc94e8d38ef5be11c417dd81.tar.gz rails-185c3dbc6ab845edfc94e8d38ef5be11c417dd81.tar.bz2 rails-185c3dbc6ab845edfc94e8d38ef5be11c417dd81.zip |
assigns(:foo) should not convert @foo's keys to strings if it happens to be a hash
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/controller/test_case_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actionpack/test/controller/test_case_test.rb b/actionpack/test/controller/test_case_test.rb index c957df88b3..ecba9fed22 100644 --- a/actionpack/test/controller/test_case_test.rb +++ b/actionpack/test/controller/test_case_test.rb @@ -119,6 +119,7 @@ XML def test_assigns @foo = "foo" + @foo_hash = {:foo => :bar} render :nothing => true end @@ -292,6 +293,10 @@ XML assert_equal "foo", assigns("foo") assert_equal "foo", assigns[:foo] assert_equal "foo", assigns["foo"] + + # but the assigned variable should not have its own keys stringified + expected_hash = { :foo => :bar } + assert_equal expected_hash, assigns(:foo_hash) end def test_view_assigns |