aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-09-13 14:34:59 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-13 14:34:59 -0500
commit5b8373da2978732b4666f51757b8bf281496052d (patch)
treefe7d2706b71f6dc1ae2de2540cba001b62da3ab0
parent3b6bb4664f102e4c852fe830e4de45a8d0587f41 (diff)
downloadrails-5b8373da2978732b4666f51757b8bf281496052d.tar.gz
rails-5b8373da2978732b4666f51757b8bf281496052d.tar.bz2
rails-5b8373da2978732b4666f51757b8bf281496052d.zip
Shush interpolation warnings
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 1005a7e7ad..db9073e298 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -316,8 +316,12 @@ class TestGetTextString < Test::Unit::TestCase
end
def test_no_placeholder
- assert_equal("aaa", "aaa" % {:num => 1})
- assert_equal("bbb", "bbb" % [1])
+ # Causes a "too many arguments for format string" warning
+ # on 1.8.7 and 1.9 but we still want to make sure the behavior works
+ silence_warnings do
+ assert_equal("aaa", "aaa" % {:num => 1})
+ assert_equal("bbb", "bbb" % [1])
+ end
end
def test_sprintf_ruby19_style