summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-28 12:49:43 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2017-08-28 12:49:43 +0200
commitdb4bd1a67d0d2acd7cde8b0ffedcab4e5eaf934e (patch)
tree6aae52f76eff4a555de3efdd546c118011eaca60
parent073811074bf15742a86572b933b0e3ad0f06107b (diff)
downloadgitlab-ce-db4bd1a67d0d2acd7cde8b0ffedcab4e5eaf934e.tar.gz
Clear schema cache after running tests for migrations
-rw-r--r--spec/support/migrations_helpers.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/support/migrations_helpers.rb b/spec/support/migrations_helpers.rb
index 255b3d96a62..4ca019c1b05 100644
--- a/spec/support/migrations_helpers.rb
+++ b/spec/support/migrations_helpers.rb
@@ -16,6 +16,8 @@ module MigrationsHelpers
end
def reset_column_in_migration_models
+ ActiveRecord::Base.clear_cache!
+
described_class.constants.sort.each do |name|
const = described_class.const_get(name)