Sha256: 5df89be356b30f88581a1919016f6d7f10da6a66376282444a06d230fe1588bb
Contents?: true
Size: 1.69 KB
Versions: 11
Compression:
Stored size: 1.69 KB
Contents
LIB_DIR = File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")) $LOAD_PATH.unshift LIB_DIR unless $LOAD_PATH.include?(LIB_DIR) || $LOAD_PATH.include?(File.expand_path(LIB_DIR)) require "brightbox_cli" require "support/common_helpers" require "tmpdir" Dir["./spec/support/**/*.rb"].sort.each { |f| require f } # API_CLIENT_CONFIG_DIR = File.join(File.dirname(__FILE__), "configs/api_client") # USER_APP_CONFIG_DIR = File.join(File.dirname(__FILE__), "configs/user_application") # API_CLIENT_CONFIG = Brightbox::BBConfig.new(:directory => API_CLIENT_CONFIG_DIR) # USER_APP_CONFIG = Brightbox::BBConfig.new(:directory => USER_APP_CONFIG_DIR) # These are the contents API_CLIENT_CONFIG_CONTENTS = File.read(File.join(File.dirname(__FILE__), "configs/api_client.ini")) USER_APP_CONFIG_CONTENTS = File.read(File.join(File.dirname(__FILE__), "configs/user_app.ini")) # Remember the $HOME of the test runner TEST_RUNNER_HOME = ENV["HOME"] RSpec.configure do |config| config.include CommonHelpers config.include ConfigHelpers config.include TokenHelpers config.include PasswordPromptHelpers config.filter_run_excluding :vcr if RUBY_VERSION <= "1.8.7" # For each test, point to the testing endpoint to make it safer and easier to # record from dev endpoints. Devs can DNS api.brightbox.dev to their dev service config.before do stub_const("Brightbox::DEFAULT_API_ENDPOINT", "http://api.brightbox.dev") end # For each test, isolate the testing users $HOME so that we control the config # and any cached values completely. config.around(:each) do |example| Dir.mktmpdir do |tmp_home| ENV["HOME"] = tmp_home example.run ENV["HOME"] = TEST_RUNNER_HOME end end end
Version data entries
11 entries across 11 versions & 1 rubygems