I believe that if `@conf['profile']` doesn't exist @profile_name may not
be initialized.
```
inspec-master/lib/inspec/profile_context.rb:35: warning: instance variable @profile_name not initialized
```
Signed-off-by: Miah Johnson <miah@chia-pet.org>
memoize @unique_controls to a Set if nil and
check that its empty? to continue and add controls
/home/miah/projects/github/inspec-master/lib/inspec/reporters/cli.rb:169: warning: instance variable @unique_controls not initialized
Signed-off-by: Miah Johnson <miah@chia-pet.org>
This was testing serverspec compatibility, but those days are long past us and this is a deprecated resource now. This will quiet our tests up a bit.
Signed-off-by: Tim Smith <tsmith@chef.io>
Before you had to kick off kitchen via Rake as the Rake task build the local gem we injected into the cookbook. Now we do it within Test Kitchen using a feature that didn't exist when this was all written. Also --output is your friend and greatly reduces the complexity of all this.
Signed-off-by: Tim Smith <tsmith@chef.io>
I'd suggest starting to structure kitchen testing like this with a
directory and subdirs to keep the kitchen testing gems out of the
root Gemfile entirely.
This still mounts the root dir in /inspec so the root Gemfile
is still what you're running the rake tests against.
By having an extra layer of subdirs, then you can split up different
use cases like the rake-testing vs. the audit cookbook testing.
Otherwise it'll be a mess of having to manage different kitchen.yml
files that require way too many different drivers/provisioners/verifiers
This updates our Code of Conduct to match what is in our .github health
repo, which is also used by all of Chef.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
RSpec is used internally. Minitest is used for our tests. They don't
really like each other. This fixes that and gets our tests
consistently running the correct number of tests (they were load-order
dependent before and each platform had its own different number of
tests it would run).
Signed-off-by: Ryan Davis <zenspider@chef.io>
These tests both involve dynamic un-rooted classes. As such, they have
no name and thus print like #<Class:0xXXXXXXXX:...>. I switched one to
a describe instead of Class.new(Minitest::Test) and the other I
stringified the anonymous class.
Signed-off-by: Ryan Davis <zenspider@chef.io>
While debugging this hairy situation, I had hooked require to try to
figure out sequencing. These requires were called thousands upon
thousands of times, creating a lot of noise and having no benefit
other than a possible savings of a few millisecond on an already slow
startup.
Signed-off-by: Ryan Davis <zenspider@chef.io>