From 265a7ee2530999f17cdec5c0f09934b776dad5f3 Mon Sep 17 00:00:00 2001 From: cmrd Senya Date: Sun, 24 Sep 2017 13:00:40 +0300 Subject: [PATCH] Don't force fixtures rebuild on each rspec run Main purpose of fixtures for us is to speed up test runs. Rebuilding fixtures each run makes them pointless. They will be rebuilt automatically if some of "files_to_check" are changed, so we're protected from the case when fixtures are outdated and don't load properly. --- spec/spec_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3be837537..8cb7fa13b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -82,9 +82,6 @@ def client_assertion_with_nonexistent_client_id_path "client_assertion_with_nonexistent_client_id.txt") end -# Force fixture rebuild -FileUtils.rm_f(Rails.root.join("tmp", "fixture_builder.yml")) - # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. fixture_builder_file = "#{File.dirname(__FILE__)}/support/fixture_builder.rb" @@ -93,6 +90,9 @@ support_files.each {|f| require f } require fixture_builder_file RSpec.configure do |config| + config.fixture_path = Rails.root.join("spec", "fixtures") + config.global_fixtures = :all + config.include Devise::Test::ControllerHelpers, type: :controller config.include Devise::Test::IntegrationHelpers, type: :request config.mock_with :rspec