aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/instrumentation_test.rb
diff options
context:
space:
mode:
authorRafael França <rafaelmfranca@gmail.com>2018-11-27 14:43:01 -0500
committerGitHub <noreply@github.com>2018-11-27 14:43:01 -0500
commitddaca7ccec208ee80652e696e001671fd6e735f9 (patch)
treeb9da5c640d7620bda396ff5cb667f4a999e3cde6 /activerecord/test/cases/instrumentation_test.rb
parente4aec40578ea0dd2944f97f1ad60cfbdf4b3a44d (diff)
parentd34c1fc3d64e51f9aeecfbffefd843e744dfbeac (diff)
downloadrails-ddaca7ccec208ee80652e696e001671fd6e735f9.tar.gz
rails-ddaca7ccec208ee80652e696e001671fd6e735f9.tar.bz2
rails-ddaca7ccec208ee80652e696e001671fd6e735f9.zip
Merge pull request #34528 from DmitryTsepelev/fix-ignored-attributes
Additional types of ResultSet should not contain keys of #attributes_to_define_after_schema_loads
Diffstat (limited to 'activerecord/test/cases/instrumentation_test.rb')
-rw-r--r--activerecord/test/cases/instrumentation_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/instrumentation_test.rb b/activerecord/test/cases/instrumentation_test.rb
index e6e8468757..c09ea32991 100644
--- a/activerecord/test/cases/instrumentation_test.rb
+++ b/activerecord/test/cases/instrumentation_test.rb
@@ -5,6 +5,10 @@ require "models/book"
module ActiveRecord
class InstrumentationTest < ActiveRecord::TestCase
+ def setup
+ ActiveRecord::Base.connection.schema_cache.add(Book.table_name)
+ end
+
def test_payload_name_on_load
Book.create(name: "test book")
subscriber = ActiveSupport::Notifications.subscribe("sql.active_record") do |*args|