Skip to content

Commit e64baf3

Browse files
committed
[MODEL] Moved require within unit test to the top of the file
This is to avoid: activesupport-4.0.13/lib/active_support/json.rb:2: warning: loading in progress, circular require considered harmful
1 parent fa2b525 commit e64baf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

elasticsearch-model/test/unit/response_result_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'test_helper'
2+
require 'active_support/json/encoding'
23

34
class Elasticsearch::Model::ResultTest < Test::Unit::TestCase
45
context "Response result" do
@@ -80,7 +81,6 @@ class Elasticsearch::Model::ResultTest < Test::Unit::TestCase
8081
end
8182

8283
should "delegate as_json to @result even when ActiveSupport changed half of Ruby" do
83-
require 'active_support/json/encoding'
8484
result = Elasticsearch::Model::Response::Result.new foo: 'bar'
8585

8686
result.instance_variable_get(:@result).expects(:as_json)

0 commit comments

Comments
 (0)