Silence some warnings.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper 2007-05-18 21:16:43 +00:00
parent 57b5fb43ef
commit d2acf8b548
2 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,12 @@
require 'active_support/json/variable'
require 'active_support/json/encoders/object' # Require this file explicitly for rdoc
Dir[File.dirname(__FILE__) + '/encoders/**/*.rb'].each { |file| require file[0..-4] }
require 'active_support/json/encoders/object' # Require explicitly for rdoc.
Dir["#{File.dirname(__FILE__)}/encoders/**/*.rb"].each do |file|
basename = File.basename(file, '.rb')
unless basename == 'object'
require "active_support/json/encoders/#{basename}"
end
end
module ActiveSupport
module JSON

View File

@ -49,8 +49,8 @@ class AssertDifferenceTest < Test::Unit::TestCase
def test_expression_is_evaluated_in_the_appropriate_scope
local_scope = 'foo'
assert_difference 'local_scope; @object.num' do
@object.increment
silence_warnings do
assert_difference('local_scope; @object.num') { @object.increment }
end
end
end