obj.method(name).call(*args) == obj.send(name, *args)
```
Calculating -------------------------------------
method+call 2.561M (± 2.2%) i/s - 12.816M in 5.006835s
send 6.299M (± 2.4%) i/s - 31.501M in 5.004045s
Comparison:
send: 6299002.5 i/s
method+call: 2560909.2 i/s - 2.46x slower
```
There aren't any direct tests for this? But I forcefully failed 2
functionals and then verified they passed after my change.
Not sure how (or if) to write tests against rspec matchers in a
meaningful way, even tho all I really want to test is a plain ole
method in it. I'll poke to see if it is possible / practical.
Signed-off-by: Ryan Davis <zenspider@chef.io>
Moved exec_inspec to inspec_path.
Added new exec_inspec that invokes ruby w/ -Ilib (expanded).
Decouples from bundler and/or needing inspec-bin to be installed.
Signed-off-by: Ryan Davis <zenspider@chef.io>
Can also try to use the bundler version first and then fall back to
VERSION... but VERSION is absolutely free.
Happy to push an edit to this to remove the comment or fold it in.
Signed-off-by: Ryan Davis <zenspider@chef.io>
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>