aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/abstract_unit.rb11
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb2
2 files changed, 10 insertions, 3 deletions
diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb
index da338a2a26..67f652325e 100644
--- a/activesupport/test/abstract_unit.rb
+++ b/activesupport/test/abstract_unit.rb
@@ -1,10 +1,17 @@
-require File.expand_path('../../../load_paths', __FILE__)
+begin
+ old, $VERBOSE = $VERBOSE, nil
+ require File.expand_path('../../../load_paths', __FILE__)
+ensure
+ $VERBOSE = old
+end
lib = File.expand_path("#{File.dirname(__FILE__)}/../lib")
$:.unshift(lib) unless $:.include?('lib') || $:.include?(lib)
require 'test/unit'
-require 'mocha'
+require 'active_support/core_ext/kernel/reporting'
+
+silence_warnings { require 'mocha' }
ENV['NO_RELOAD'] = '1'
require 'active_support'
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index a50e259726..234e41c772 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -285,7 +285,7 @@ class TestGetTextString < Test::Unit::TestCase
def test_percent
assert_equal("% 1", "%% %<num>d" % {:num => 1.0})
- assert_equal("%{num} %<num>d", "%%{num} %%<num>d" % {:num => 1})
+ assert_equal("%{num} %<num>d 1", "%%{num} %%<num>d %<num>d" % {:num => 1})
end
def test_sprintf_percent_in_replacement