diff options
author | danielsdeleo <dan@getchef.com> | 2014-08-07 18:20:20 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2014-08-10 09:40:36 -0700 |
commit | 674cc65dc68b9d5f0eaa36f2409c6c12becf2c11 (patch) | |
tree | 7c33437663b794c5cdbbd78eff5a77f0b83ead1f /spec/integration/knife/serve_spec.rb | |
parent | e2a6b85f5b095f2350fa24f8e825fa22660fcbc7 (diff) | |
download | chef-674cc65dc68b9d5f0eaa36f2409c6c12becf2c11.tar.gz |
Convert Chef Zero helpers to instance methods
* Prefer instance methods to class methods for Chef Zero helpers.
RSpec's design and feature set heavily favors using instance methods
for test setup. This change will allow us to use let bindings and more
naturally move common setup to shared contexts.
* Temporarily copy ChefZero's RSpec features in-repo. master of Chef
Zero is currently broken for unit testing. Copy the changes here for
now so we can make progress.
* Automatically generate a metadata file when using the "cookbook"
helper function. This will be needed for a subsequent change that
makes `name' required in metadata.
Diffstat (limited to 'spec/integration/knife/serve_spec.rb')
-rw-r--r-- | spec/integration/knife/serve_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/integration/knife/serve_spec.rb b/spec/integration/knife/serve_spec.rb index 20e4e43586..32e633543d 100644 --- a/spec/integration/knife/serve_spec.rb +++ b/spec/integration/knife/serve_spec.rb @@ -20,12 +20,12 @@ require 'chef/knife/serve' require 'chef/server_api' describe 'knife serve' do - extend IntegrationSupport + include IntegrationSupport include KnifeSupport include AppServerSupport when_the_repository 'also has one of each thing' do - file 'nodes/x.json', { 'foo' => 'bar' } + before { file 'nodes/x.json', { 'foo' => 'bar' } } it 'knife serve serves up /nodes/x' do exception = nil |