aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2011-06-12 15:03:24 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2011-06-12 15:32:46 +0100
commit1fa059cd017c134499835593ba29620c4cd7358c (patch)
tree3e8ff090c466a8023856c59cea5b03925075c443 /activesupport/test/core_ext
parentcd99784d99f1700b9af05c5f01e00e988c8557d5 (diff)
downloadrails-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.rb8
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