spec_helper.rb revision 4c405005e95a28dd5a0b0c978aaece1b097d9486
e3885aacc4f26c817827173a754510807b6bc84cTim Reddehase# This file is copied to spec/ when you run 'rails generate rspec:install'
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim Reddehaserequire File.expand_path("../../spec/shared_helper", __FILE__)
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim Reddehaserequire File.expand_path("../../config/environment", __FILE__)
3da7bc412bbfe11a5fec5a93e938c7f9369dfd51Tim Reddehaserequire File.expand_path("../hets_helper", __FILE__)
3da7bc412bbfe11a5fec5a93e938c7f9369dfd51Tim Reddehaserequire Rails.root.join('config', 'database_cleaner.rb')
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim ReddehaseWebMock.disable_net_connect!(allow_localhost: true)
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim Reddehaseelasticsearch_port = ENV['ELASTIC_TEST_PORT'].present? ? ENV['ELASTIC_TEST_PORT'] : '9250'
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim ReddehaseElasticsearch::Model.client = Elasticsearch::Client.new host: "localhost:#{elasticsearch_port}"
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim Reddehase# Requires supporting ruby files with custom matchers and macros, etc,
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim Reddehase# in spec/support/ and its subdirectories.
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim ReddehaseDir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
ad0951c31d4cb89b36e3ada932a86de475cb68e4Tim Reddehaserequire Rails.root.join('spec', 'support', 'common_helper_methods.rb')
e3885aacc4f26c817827173a754510807b6bc84cTim Reddehase allow(AuthorizedKeysManager).to receive(:copy_authorized_keys_to_git_home)
e3885aacc4f26c817827173a754510807b6bc84cTim Reddehase full_path = RSpec.configuration.current_file_path
e3885aacc4f26c817827173a754510807b6bc84cTim Reddehase full_path.match(/#{prefix}(?<path>.*)\.rb$/)[:path]
e3885aacc4f26c817827173a754510807b6bc84cTim Reddehase# Generate a generic cassette name for any example or context.
e3885aacc4f26c817827173a754510807b6bc84cTim Reddehase "specs/#{current_file_path}/#{current_full_description}"
e3885aacc4f26c817827173a754510807b6bc84cTim Reddehase# Recording HTTP Requests
c.ignore_localhost = true
RSpec.configure do |config|
config.include Devise::TestHelpers, type: :controller
config.mock_with :rspec do |mocks|