spec/spec_helper.rb in tijuana_client-0.2.4 vs spec/spec_helper.rb in tijuana_client-0.3.0

- old
+ new

@@ -1,15 +1,16 @@ +# frozen_string_literal: true + $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) $LOAD_PATH.unshift(File.dirname(__FILE__)) require 'rspec' require 'tijuana_client' require 'webmock/rspec' - # Requires supporting files with custom matchers and macros, etc, # in ./support/ and its subdirectories. -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} +Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |f| require f } RSpec.configure do |config| config.color = true end @@ -32,14 +33,14 @@ stub_tijuana_request(:post, path) end def stub_tijuana_request(method, path) prefix = TijuanaClient.new.connection.configuration.prefix.to_s - stub_request(method, "https://test.com" + prefix + path) + stub_request(method, "https://test.com#{prefix}#{path}") end def fixture_path - File.expand_path("../fixtures", __FILE__) + File.expand_path('fixtures', __dir__) end def fixture(file) File.new(File.join(fixture_path, '/', file)) end