From ea9576096bd9f1df267ccd63fcc9f7cd7c9b7d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Fri, 30 Nov 2018 17:28:59 +0100 Subject: [PATCH] Don't load tasks if they're already loaded We were having problems under certain conditions with Travis and Knapsack where tasks were still being loaded twice and so they were being executed twice. --- Rakefile | 2 +- spec/rails_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 13a99536b..c4d34f626 100644 --- a/Rakefile +++ b/Rakefile @@ -3,5 +3,5 @@ require File.expand_path('../config/application', __FILE__) -Rails.application.load_tasks +Rails.application.load_tasks if Rake::Task.tasks.empty? KnapsackPro.load_tasks if defined?(KnapsackPro) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index c90695dca..c3772d5d8 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -12,7 +12,7 @@ require 'capybara/rails' require 'capybara/rspec' require 'selenium/webdriver' -Rails.application.load_tasks +Rails.application.load_tasks if Rake::Task.tasks.empty? I18n.default_locale = :en include Warden::Test::Helpers