ENV['RAILS_ENV'] ||= 'test'
if ENV['RAILS_ENV'] == 'test'
  require 'simplecov'
  SimpleCov.start("rails")
end

require_relative '../config/environment'
require 'test/unit/rails/test_help'
require 'test/unit/rr'
require 'test/unit/capybara'
require 'capybara-screenshot/testunit' # for integration test

require 'webmock/test_unit'
WebMock.disable_net_connect!(allow_localhost: true)


module FixturePath
  def fixture_path(fixture_name)
    Rails.root.join("test/fixtures", fixture_name).to_s
  end

  def fixture_content(fixture_name)
    Rails.root.join("test/fixtures", fixture_name).read
  end
end

class ActiveSupport::TestCase
  # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
  #fixtures :all

  # Add more helper methods to be used by all tests here...
  include FixturePath
  extend FixturePath
end

Dir[Rails.root.join("test/support/**/*.rb")].each do |path|
  require(path)
end

ENV['RAILS_ENV'] ||= 'test'
if ENV['RAILS_ENV'] == 'test'
  require 'simplecov'
  SimpleCov.start("rails")
end

require_relative '../config/environment'
require 'test/unit/rails/test_help'
require 'test/unit/rr'
require 'test/unit/capybara'
require 'capybara-screenshot/testunit' # for integration test

require 'webmock/test_unit'
WebMock.disable_net_connect!(allow_localhost: true,
                             allow: "chromedriver.storage.googleapis.com")

module FixturePath
  def fixture_path(fixture_name)
    Rails.root.join("test/fixtures", fixture_name).to_s
  end

  def fixture_content(fixture_name)
    Rails.root.join("test/fixtures", fixture_name).read
  end
end

class ActiveSupport::TestCase
  # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
  #fixtures :all

  # Add more helper methods to be used by all tests here...
  include FixturePath
  extend FixturePath
end

Dir[Rails.root.join("test/support/**/*.rb")].each do |path|
  require(path)
end

Allow accessing "chromedriver.storage.googleapis.com" to check chromedriver version
Allow accessing "chromedriver.storage.googleapis.com" to check chromedriver version

Signed-off-by: Kenji Okimoto <7a4b90a0a1e6fc688adec907898b6822ce215e6c@clear-code.com>
