spec/spec_helper.rb in solidus_frontend-2.5.2 vs spec/spec_helper.rb in solidus_frontend-2.6.0.rc1
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
if ENV["COVERAGE"]
require 'simplecov'
SimpleCov.start('rails')
end
@@ -8,11 +10,11 @@
ENV["RAILS_ENV"] ||= 'test'
require 'solidus_frontend'
require 'spree/testing_support/dummy_app'
DummyApp.setup(
- gem_root: File.expand_path('../../', __FILE__),
+ gem_root: File.expand_path('..', __dir__),
lib_name: 'solidus_frontend'
)
require 'rails-controller-testing'
require 'rspec/rails'
@@ -51,10 +53,10 @@
end
config.mock_with :rspec do |c|
c.syntax = :expect
end
- config.fixture_path = File.join(File.expand_path(File.dirname(__FILE__)), "fixtures")
+ config.fixture_path = File.join(__dir__, "fixtures")
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, comment the following line or assign false
# instead of true.
config.use_transactional_fixtures = true