diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-11-08 10:43:35 +0100 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-11-14 12:41:16 +0100 |
commit | 134edbd7c2b255369461c93f90c5b702f67a75ab (patch) | |
tree | 45b81f5068e1aa20b147c6c5699ec7027043ef6e /spec/spec_helper.rb | |
parent | 7dcf3977ebe81f25125493706dd417af27fb4668 (diff) | |
download | gitlab-ce-134edbd7c2b255369461c93f90c5b702f67a75ab.tar.gz |
Address specs failing in rails 4
We want to run CI with rails 4 for a short-term (until we are sure that
we will ship with rails 5). The problem is that rails 4 can not handle
rails 5 schema.rb properly - specifically `t.index` directive can not
handle multiple indexes on the same column.
Because combination of rails 4 + rails 5 schema will be used
only in CI for a short-term, we can just ignore these incompatibility
failures. This patch adds `rails5` helper for specs.
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index cd69160be10..3fedb9ed48c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -235,6 +235,10 @@ RSpec.configure do |config| example.run if Gitlab::Database.mysql? end + config.around(:each, :rails5) do |example| + example.run if Gitlab.rails5? + end + # This makes sure the `ApplicationController#can?` method is stubbed with the # original implementation for all view specs. config.before(:each, type: :view) do |