diff options
author | Andrew White <andyw@pixeltrix.co.uk> | 2011-06-12 15:03:24 +0100 |
---|---|---|
committer | Andrew White <andyw@pixeltrix.co.uk> | 2011-06-12 15:32:46 +0100 |
commit | 1fa059cd017c134499835593ba29620c4cd7358c (patch) | |
tree | 3e8ff090c466a8023856c59cea5b03925075c443 /activesupport/test/core_ext | |
parent | cd99784d99f1700b9af05c5f01e00e988c8557d5 (diff) | |
download | rails-1fa059cd017c134499835593ba29620c4cd7358c.tar.gz rails-1fa059cd017c134499835593ba29620c4cd7358c.tar.bz2 rails-1fa059cd017c134499835593ba29620c4cd7358c.zip |
Define ActiveSupport#to_param as to_str - closes #1663
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r-- | activesupport/test/core_ext/string_ext_test.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index 32675c884a..7a8cda160d 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -251,7 +251,7 @@ class StringInflectionsTest < Test::Unit::TestCase # And changes the original string: assert_equal original, expected end - + def test_string_inquiry assert "production".inquiry.production? assert !"production".inquiry.development? @@ -451,6 +451,12 @@ class OutputSafetyTest < ActiveSupport::TestCase assert !'ruby'.encoding_aware? end end + + test "call to_param returns a normal string" do + string = @string.html_safe + assert string.html_safe? + assert !string.to_param.html_safe? + end end class StringExcludeTest < ActiveSupport::TestCase |