diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-08 12:43:13 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-08 12:43:13 +0300 |
commit | eb95019178a002e0c016e60c7b8ef3eb49f7997e (patch) | |
tree | dd5300bb0d3a6a76e7b3960a82c38cc29f3601db | |
parent | 915ad255cdc7afa9a44ba24eed62f28184e81836 (diff) |
Enable Knapsack only in CI environment
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | features/support/env.rb | 6 | ||||
-rw-r--r-- | spec/spec_helper.rb | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG index 5136756079d..59c71699421 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -38,6 +38,7 @@ v 8.9.0 (unreleased) - Make authentication service for Container Registry to be compatible with < Docker 1.11 - Add Application Setting to configure Container Registry token expire delay (default 5min) - Cache assigned issue and merge request counts in sidebar nav + - Use Knapsack only in CI environment - Cache project build count in sidebar nav - Reduce number of queries needed to render issue labels in the sidebar - Improve error handling importing projects diff --git a/features/support/env.rb b/features/support/env.rb index 4552db8ad77..edc08cf0986 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -11,13 +11,15 @@ ENV['RAILS_ENV'] = 'test' require './config/environment' require 'rspec/expectations' require 'sidekiq/testing/inline' -require 'knapsack' require_relative 'capybara' require_relative 'db_cleaner' require_relative 'rerun' -Knapsack::Adapters::SpinachAdapter.bind +if ENV['CI'] + require 'knapsack' + Knapsack::Adapters::RSpecAdapter.bind +end %w(select2_helper test_env repo_helpers).each do |f| require Rails.root.join('spec', 'support', f) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a20f4c05971..b43f38ef202 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -15,9 +15,11 @@ require 'rspec/rails' require 'shoulda/matchers' require 'sidekiq/testing/inline' require 'rspec/retry' -require 'knapsack' -Knapsack::Adapters::RSpecAdapter.bind +if ENV['CI'] + require 'knapsack' + Knapsack::Adapters::RSpecAdapter.bind +end # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. |