diff options
author | José Valim <jose.valim@gmail.com> | 2011-02-10 16:50:35 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2011-02-10 16:50:35 +0100 |
commit | 89a5f1463d7e9546ed7a0cf482afea99ba2040e7 (patch) | |
tree | 2a8ed779ae295c83dcb886839bf47be0bcdbbee0 /actionpack/test/template/raw_output_helper_test.rb | |
parent | 98c0c5db50a7679b3d58769ac22cb0a27a62c930 (diff) | |
download | rails-89a5f1463d7e9546ed7a0cf482afea99ba2040e7.tar.gz rails-89a5f1463d7e9546ed7a0cf482afea99ba2040e7.tar.bz2 rails-89a5f1463d7e9546ed7a0cf482afea99ba2040e7.zip |
Revert "Removed Array#safe_join in AS core_ext and moved it to a view helper with the same same."
Applied the wrong version.
This reverts commit 98c0c5db50a7679b3d58769ac22cb0a27a62c930.
Diffstat (limited to 'actionpack/test/template/raw_output_helper_test.rb')
-rw-r--r-- | actionpack/test/template/raw_output_helper_test.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/actionpack/test/template/raw_output_helper_test.rb b/actionpack/test/template/raw_output_helper_test.rb new file mode 100644 index 0000000000..598aa5b1d8 --- /dev/null +++ b/actionpack/test/template/raw_output_helper_test.rb @@ -0,0 +1,21 @@ +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
\ No newline at end of file |