From fb5a9356dc61b339fc85980b418ee9166772c3fc Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Tue, 20 Nov 2018 17:24:02 +0800 Subject: [PATCH] Fix spec_helper.rb of web engine This fixes the tests of the web engine when running the following from its root: bundle exec rspec An engine is meant to have some independence from the main application, and its tests should be run independently. This should be using the engine's own dummy application, actually, or the dummy application of a dependency. --- engines/web/spec/spec_helper.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/engines/web/spec/spec_helper.rb b/engines/web/spec/spec_helper.rb index 3306063166..9cfd0bc717 100644 --- a/engines/web/spec/spec_helper.rb +++ b/engines/web/spec/spec_helper.rb @@ -1,8 +1,3 @@ -ENV["RAILS_ENV"] = "test" - -require File.expand_path("dummy/config/environment.rb", __dir__) -require "rails/test_help" - -Rails.backtrace_cleaner.remove_silencers! +require "../../spec/spec_helper.rb" Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }