Add missing requires

Currently, executing the test with only `attribute_set_test.rb` results in an error.

```
./bin/test -w test/cases/attribute_set_test.rb
Run options: --seed 33470

# Running:

E

Error:
ActiveModel::AttributeSetTest#test_#map_returns_a_new_attribute_set_with_the_changes_applied:
NameError: uninitialized constant ActiveModel::AttributeSetTest::AttributeSet
Did you mean?  ActiveModel::Attributes
               ActiveModel::Attribute
    activemodel/test/cases/attribute_set_test.rb:235:in `block in <class:AttributeSetTest>'

bin/test test/cases/attribute_set_test.rb:234
```

Added a missing require to fix this.

Also, I suspect that this is the cause of failures in CI.
Ref: https://travis-ci.org/rails/rails/jobs/299994708
This commit is contained in:
yuuji.yaginuma 2017-11-10 14:25:16 +09:00
parent 8c7967c9b9
commit c59ab795ee
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,7 @@
# frozen_string_literal: true
require "active_support/core_ext/object/duplicable"
module ActiveModel
class Attribute # :nodoc:
class << self

View File

@ -1,6 +1,8 @@
# frozen_string_literal: true
require "cases/helper"
require "active_model/attribute_set"
require "active_model/type"
module ActiveModel
class AttributeSetTest < ActiveModel::TestCase