Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Shush interpolation warnings
  • Loading branch information
josh committed Sep 13, 2009
1 parent 3b6bb46 commit 5b8373d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions activesupport/test/core_ext/string_ext_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 5b8373d

Please sign in to comment.