aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2011-04-18 10:56:37 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-18 10:57:38 +0200
commit39372964d245ba7077515a698eaf71cb534800fe (patch)
tree397b59003c3a9171bd6727a7651cdbc64e8c7881 /activesupport/test/core_ext
parent389d15ef139e50696b274f2d61dd309ba2632877 (diff)
downloadrails-39372964d245ba7077515a698eaf71cb534800fe.tar.gz
rails-39372964d245ba7077515a698eaf71cb534800fe.tar.bz2
rails-39372964d245ba7077515a698eaf71cb534800fe.zip
Add String#inquiry as a convenience method for turning a string into a StringInquirer object [DHH]
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index bb865cae91..f0c289a418 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -250,6 +250,11 @@ 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?
+ end
def test_truncate
assert_equal "Hello World!", "Hello World!".truncate(12)