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

Version Path
prototype-rails-4.0.0 test/template/render_test.rb
prototype-rails-3.2.1 test/template/render_test.rb
prototype-rails-3.2.0.rc1 test/template/render_test.rb
prototype-rails-3.2.0 test/template/render_test.rb
prototype-rails-3.1.0 test/template/render_test.rb
prototype-rails-0.3.1 test/template/render_test.rb
prototype-rails-0.3.0 test/template/render_test.rb
prototype-rails-0.2 test/template/render_test.rb
prototype-rails-0.1 test/template/render_test.rb