opscode/chef — pull request #1783 by danielsdeleo (2014-08-08 23:04:51+00:00)
Title: Integration test refactor

Primarily this converts everything in the knife essentials tests to use instance methods instead of class methods whenever possible. This will allow us to use let bindings and other normal RSpec code reuse features to reduce repetition in these tests. My aim in doing so is to reduce the number of places I need to fix when the name attribute becomes required in metadata.

In attempting to fix chef-zero directly, I discovered that master of chef-zero is broken (as far as our tests are concerned), so I implemented some of this fix by moving `ChefZero::RSpec` code into a new helper file. We can undo that once Chef Zero gets fixed.

I also found that the format of JSON errors expected by the integration tests was not stable due to `require 'json'` un-monkey-patching JSON (previously monkey-patched by ffi-yajl). We might want to revisit whether trying to provide compatibility with the JSON gem is worthwhile.