diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-03-16 20:12:04 -0300 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-03-16 16:20:10 -0700 |
commit | 0c1ac36ccb7d72f3d17d950d030442a7e83d0708 (patch) | |
tree | 87bcfb439573fa7d6eb8565ea47756d5e43047bc /actionpack/test | |
parent | 7a5da2148140eb6824e283d7100727f7227a071e (diff) | |
download | rails-0c1ac36ccb7d72f3d17d950d030442a7e83d0708.tar.gz rails-0c1ac36ccb7d72f3d17d950d030442a7e83d0708.tar.bz2 rails-0c1ac36ccb7d72f3d17d950d030442a7e83d0708.zip |
scope_key_by_partial fix for Ruby 1.9 when there's virtual_path [#4202 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/fixtures/test/scoped_array_translation.erb | 1 | ||||
-rw-r--r-- | actionpack/test/template/translation_helper_test.rb | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/test/fixtures/test/scoped_array_translation.erb b/actionpack/test/fixtures/test/scoped_array_translation.erb new file mode 100644 index 0000000000..0a0c79f717 --- /dev/null +++ b/actionpack/test/fixtures/test/scoped_array_translation.erb @@ -0,0 +1 @@ +<%= t(['.foo', '.bar']) %>
\ No newline at end of file diff --git a/actionpack/test/template/translation_helper_test.rb b/actionpack/test/template/translation_helper_test.rb index 5a32d71409..6782bf06d4 100644 --- a/actionpack/test/template/translation_helper_test.rb +++ b/actionpack/test/template/translation_helper_test.rb @@ -41,4 +41,10 @@ class TranslationHelperTest < ActiveSupport::TestCase @view = ActionView::Base.new(ActionController::Base.view_paths, {}) assert_equal "helper", @view.render(:file => "test/translation") end + + def test_scoping_by_partial_of_an_array + I18n.expects(:translate).with("test.scoped_array_translation.foo.bar", :raise => true).returns(["foo", "bar"]) + @view = ActionView::Base.new(ActionController::Base.view_paths, {}) + assert_equal "foobar", @view.render(:file => "test/scoped_array_translation") + end end |