Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/mixlib/cli_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
# Copyright:: Copyright (c) 2008-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
12 changes: 8 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

require "mixlib/cli"

class TestCLI
include Mixlib::CLI
end

RSpec.configure do |config|
# Use documentation format
config.formatter = "doc"
Expand All @@ -23,4 +19,12 @@ class TestCLI
config.filter_run focus: true
config.run_all_when_everything_filtered = true
config.warnings = true

config.before(:each) do
# create a fresh TestCLI class on every example, so that examples never
# pollute global variables and create ordering issues
Object.send(:remove_const, "TestCLI") if Object.const_defined?("TestCLI")
TestCLI = Class.new
TestCLI.send(:include, Mixlib::CLI)
end
end