spec/spec_helper.rb in apipie-rails-0.8.2 vs spec/spec_helper.rb in apipie-rails-0.9.0

- old
+ new

@@ -4,12 +4,12 @@ require 'simplecov' SimpleCov.minimum_coverage 89 SimpleCov.start ENV["RAILS_ENV"] ||= 'test' -APIPIE_ROOT = File.expand_path('../..', __FILE__) -require File.expand_path("../dummy/config/environment", __FILE__) +APIPIE_ROOT = File.expand_path('..', __dir__) +require File.expand_path('dummy/config/environment', __dir__) require 'rspec/rails' require 'apipie-rails' require 'test_engine' @@ -53,11 +53,11 @@ end end # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. -Dir[File.expand_path("../support/**/*.rb", __FILE__)].each {|f| require f} +Dir[File.expand_path('support/**/*.rb', __dir__)].each {|f| require f} RSpec.configure do |config| config.mock_with :rspec @@ -84,6 +84,6 @@ # # Equivalent to being in spec/controllers # end config.infer_spec_type_from_file_location! end -require 'action_controller/test_case.rb' +require 'action_controller/test_case'