Permalink
Browse files

Shush interpolation warnings

  • Loading branch information...
1 parent 3b6bb46 commit 5b8373da2978732b4666f51757b8bf281496052d @josh josh committed Sep 13, 2009
Showing with 6 additions and 2 deletions.
  1. +6 −2 activesupport/test/core_ext/string_ext_test.rb
View
8 activesupport/test/core_ext/string_ext_test.rb
@@ -316,8 +316,12 @@ def test_sprintf_lack_argument
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

0 comments on commit 5b8373d

Please sign in to comment.