From b14e4237cc959a7c5c137d3a2438f50538da9cf1 Mon Sep 17 00:00:00 2001 From: Luis Ramos Date: Thu, 12 Mar 2020 19:11:03 +0000 Subject: [PATCH] Make the task that runs engines specs run from the main app, not inside the engine Right now and for some time the engines are not independent of the main_app. We should aim for that but it will naturally take a while to disentangle the code --- engines/order_management/spec/spec_helper.rb | 10 ---------- engines/web/spec/spec_helper.rb | 3 --- lib/tasks/specs.rake | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 engines/order_management/spec/spec_helper.rb delete mode 100644 engines/web/spec/spec_helper.rb diff --git a/engines/order_management/spec/spec_helper.rb b/engines/order_management/spec/spec_helper.rb deleted file mode 100644 index 1be4512650..0000000000 --- a/engines/order_management/spec/spec_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -ENV["RAILS_ENV"] = "test" - -require "order_management" -require "../../spec/spec_helper" - -# Require factories in Spree and main application. -require 'spree/testing_support/factories' -require '../../spec/factories' - -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } diff --git a/engines/web/spec/spec_helper.rb b/engines/web/spec/spec_helper.rb deleted file mode 100644 index 9cfd0bc717..0000000000 --- a/engines/web/spec/spec_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -require "../../spec/spec_helper.rb" - -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } diff --git a/lib/tasks/specs.rake b/lib/tasks/specs.rake index bd6708dcf6..e1b91c22a3 100644 --- a/lib/tasks/specs.rake +++ b/lib/tasks/specs.rake @@ -10,7 +10,7 @@ namespace :ofn do end def execute_rspec_for_engine(engine_path) - system "cd #{engine_path.expand_path} && DISABLE_KNAPSACK=true bundle exec rspec" + system "DISABLE_KNAPSACK=true bundle exec rspec #{engine_path.expand_path}/spec" end engine_paths = detect_engine_paths