~michaelforrest/use-case-mapper/trunk

« back to all changes in this revision

Viewing changes to vendor/rails/actionpack/test/template/raw_output_helper_test.rb

  • Committer: Michael Forrest
  • Date: 2010-10-15 16:28:50 UTC
  • Revision ID: michael.forrest@canonical.com-20101015162850-tj2vchanv0kr0dun
refrozeĀ gems

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
require 'abstract_unit'
 
2
require 'testing_sandbox'
 
3
 
 
4
class RawOutputHelperTest < ActionView::TestCase
 
5
  tests ActionView::Helpers::RawOutputHelper
 
6
  include TestingSandbox
 
7
 
 
8
  def setup
 
9
    @string = "hello"
 
10
  end
 
11
 
 
12
  test "raw returns the safe string" do
 
13
    result = raw(@string)
 
14
    assert_equal @string, result
 
15
    assert result.html_safe?
 
16
  end
 
17
 
 
18
  test "raw handles nil values correctly" do
 
19
    assert_equal "", raw(nil)
 
20
  end
 
21
end
 
 
b'\\ No newline at end of file'