aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/attribute_methods/read_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/attribute_methods/read_test.rb')
-rw-r--r--activerecord/test/cases/attribute_methods/read_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/attribute_methods/read_test.rb b/activerecord/test/cases/attribute_methods/read_test.rb
index d0a9028264..3641031d12 100644
--- a/activerecord/test/cases/attribute_methods/read_test.rb
+++ b/activerecord/test/cases/attribute_methods/read_test.rb
@@ -1,4 +1,5 @@
require "cases/helper"
+require 'active_support/core_ext/object/inclusion'
module ActiveRecord
module AttributeMethods
@@ -41,13 +42,13 @@ module ActiveRecord
instance = @klass.new
@klass.column_names.each do |name|
- assert ! instance.methods.map(&:to_s).include?(name)
+ assert !name.in?(instance.methods.map(&:to_s))
end
@klass.define_attribute_methods
@klass.column_names.each do |name|
- assert(instance.methods.map(&:to_s).include?(name), "#{name} is not defined")
+ assert name.in?(instance.methods.map(&:to_s)), "#{name} is not defined"
end
end