Sha256: d46a1778e149052da58946efe67361be97e5fc644aa8796b94c1cd22751e5d9a

Contents?: true

Size: 431 Bytes

Versions: 40

Compression:

Stored size: 431 Bytes

Contents

require 'abstract_unit'
require 'testing_sandbox'

class RawOutputHelperTest < ActionView::TestCase
  tests ActionView::Helpers::RawOutputHelper
  include TestingSandbox

  def setup
    @string = "hello"
  end

  test "raw returns the safe string" do
    result = raw(@string)
    assert_equal @string, result
    assert result.html_safe?
  end

  test "raw handles nil values correctly" do
    assert_equal "", raw(nil)
  end
end

Version data entries

40 entries across 40 versions & 10 rubygems

Version Path
actionpack-2.3.18 test/template/raw_output_helper_test.rb
actionpack_csi-2.3.5.p8 test/template/raw_output_helper_test.rb
actionpack-2.3.17-rack-upgrade-2.3.17 test/template/raw_output_helper_test.rb
actionpack-2.3.17 test/template/raw_output_helper_test.rb
actionpack_csi-2.3.5.p7 test/template/raw_output_helper_test.rb
actionpack_csi-2.3.5.p6 test/template/raw_output_helper_test.rb
actionpack-2.3.16 test/template/raw_output_helper_test.rb
actionpack-rack-upgrade-2-2.3.16 test/template/raw_output_helper_test.rb
actionpack-rack-upgrade-2-2.3.15 test/template/raw_output_helper_test.rb
actionpack-2.3.15 test/template/raw_output_helper_test.rb
actionpack-rack-upgrade-2.3.16 test/template/raw_output_helper_test.rb
actionpack-rack-upgrade-2.3.15 test/template/raw_output_helper_test.rb
actionpack-rack-upgrade-2.3.14 test/template/raw_output_helper_test.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/actionpack-2.3.14/test/template/raw_output_helper_test.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/actionpack-2.3.12/test/template/raw_output_helper_test.rb
actionpack-2.3.14 test/template/raw_output_helper_test.rb
kajam-1.0.3.rc2 vendor/rails/actionpack/test/template/raw_output_helper_test.rb
actionpack-2.3.12 test/template/raw_output_helper_test.rb
radiant-1.0.0.rc2 vendor/rails/actionpack/test/template/raw_output_helper_test.rb
radiant-1.0.0.rc1 vendor/rails/actionpack/test/template/raw_output_helper_test.rb