Sha256: 52726e2825a028b03ed11ef1c98bcd7e71590ef21cb91c68913676d21ddaacf6
Contents?: true
Size: 1.98 KB
Versions: 3
Compression:
Stored size: 1.98 KB
Contents
# This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper"` to ensure that it is only # loaded once. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration begin require 'simplecov' SimpleCov.start rescue LoadError end require 'stringio' require 'clamp' require 'ruby_dig' require 'kontena_cli' require 'webmock/rspec' RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run :focus # Run specs in random order to surface order dependencies. If you find an # order dependency and want to debug it, you can fix the order by providing # the seed, which is printed after each run. # --seed 1234 config.order = 'random' config.before(:each) do allow(Dir).to receive(:home).and_return('/tmp/') allow(ENV).to receive(:[]).with(anything).and_call_original allow(ENV).to receive(:[]).with('DEBUG').and_call_original Kontena::Cli::Config.reset_instance end # disable pastel colors for all specs, regardless of order config.before(:all) do Kontena.pastel.resolver.color.disable! end config.after(:each) do RSpec::Mocks.space.proxy_for(File).reset RSpec::Mocks.space.proxy_for(Kontena::Cli::Config).reset File.unlink(Kontena::Cli::Config.default_config_filename) if File.exist?(Kontena::Cli::Config.default_config_filename) end config.around(:each) do |example| stdout = $stdout stderr = $stderr $stdout = $stderr = StringIO.new begin example.run rescue SystemExit => exc fail "SystemExit with code #{exc.status}: \n#{$stderr.string}" ensure $stdout = stdout $stderr = stderr end end end require_relative 'support/client_helpers' require_relative 'support/requirements_helper' require_relative 'support/fixtures_helpers' require_relative 'support/output_helpers' require_relative 'support/exit_with_error_helper'
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
kontena-cli-1.4.1 | spec/spec_helper.rb |
kontena-cli-1.4.1.rc1 | spec/spec_helper.rb |
kontena-cli-1.4.1.pre1 | spec/spec_helper.rb |