From 19c48281a7bd94a42a80c1f8fc905e95820e8506 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 27 Dec 2009 15:49:29 -0800 Subject: String#exclude? core extension: inverse of #include? --- activesupport/test/core_ext/string_ext_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb index 6ed209f724..9a805bc010 100644 --- a/activesupport/test/core_ext/string_ext_test.rb +++ b/activesupport/test/core_ext/string_ext_test.rb @@ -441,3 +441,10 @@ class OutputSafetyTest < ActiveSupport::TestCase assert @string.html_safe? end end + +class StringExcludeTest < ActiveSupport::TestCase + test 'inverse of #include' do + assert_equal false, 'foo'.exclude?('o') + assert_equal true, 'foo'.exclude?('p') + end +end -- cgit v1.2.3