Sha256: c713f6a19254ea655031108268daad4af98f290e824213bdb2db0c82c3b15192
Contents?: true
Size: 743 Bytes
Versions: 9
Compression:
Stored size: 743 Bytes
Contents
require 'abstract_unit' class TestController < ActionController::Base end module RenderTestCases def setup_view(paths) @assigns = { :secret => 'in the sauce' } @view = ActionView::Base.new(paths, @assigns) @controller_view = TestController.new.view_context # Reload and register danish language for testing I18n.reload! I18n.backend.store_translations 'da', {} I18n.backend.store_translations 'pt-BR', {} # Ensure original are still the same since we are reindexing view paths assert_equal ORIGINAL_LOCALES, I18n.available_locales.map {|l| l.to_s }.sort end def test_render_update assert_equal 'alert("Hello, World!");', @view.render(:update) { |page| page.alert('Hello, World!') } end end
Version data entries
9 entries across 9 versions & 1 rubygems