diff --git a/lib/cpl.rb b/lib/cpl.rb index bd22cd71..a4af3475 100644 --- a/lib/cpl.rb +++ b/lib/cpl.rb @@ -198,6 +198,9 @@ def self.all_base_commands private def show_info_header(config) + # We don't want to show the header when running rspec + return if ENV["RACK_ENV"] == "test" + rows = {} rows["ORG"] = config.org || "NOT PROVIDED!" rows["APP"] = config.app || "NOT PROVIDED!" diff --git a/spec/cpl_spec.rb b/spec/cpl_spec.rb index 03dd2133..dc0d4efc 100644 --- a/spec/cpl_spec.rb +++ b/spec/cpl_spec.rb @@ -37,7 +37,7 @@ args = [option_key_name, option_value] end - allow(Config).to receive(:new).with([], { option[:name].to_sym => option_value }).and_call_original + allow(Config).to receive(:new).with([], { option[:name].to_sym => option_value }, []).and_call_original allow_any_instance_of(Config).to receive(:find_app_config_file).and_return("spec/fixtures/config.yml") # rubocop:disable RSpec/AnyInstance expect_any_instance_of(Command::Test).to receive(:call) # rubocop:disable RSpec/AnyInstance diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0939d17a..80eb0a24 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -4,6 +4,8 @@ require "timecop" require "vcr" +ENV["RACK_ENV"] = "test" + SimpleCov.start do enable_coverage :branch end