mirror of
https://github.com/github/rails.git
synced 2026-01-30 08:48:06 -05:00
Silence some warnings.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6772 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user