diff options
author | Lamont Granquist <lamont@opscode.com> | 2013-04-01 17:15:20 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@opscode.com> | 2013-04-01 17:15:20 -0700 |
commit | fcb70b7cdfe65067c049fb072558be4e2439497a (patch) | |
tree | 26ec56601439ae28294fa0dbd62caedc6ee2fcd8 /spec/unit/provider/template_spec.rb | |
parent | aa90c3a2d5d43feefff0470b64bcfb279ab3e598 (diff) | |
download | chef-fcb70b7cdfe65067c049fb072558be4e2439497a.tar.gz |
moving let()s out of behavior
Diffstat (limited to 'spec/unit/provider/template_spec.rb')
-rw-r--r-- | spec/unit/provider/template_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/provider/template_spec.rb b/spec/unit/provider/template_spec.rb index 4d9b6183ac..e3add8cdd2 100644 --- a/spec/unit/provider/template_spec.rb +++ b/spec/unit/provider/template_spec.rb @@ -25,6 +25,19 @@ require 'support/shared/unit/provider/file' describe Chef::Provider::Template do + let(:node) { double('Chef::Node') } + let(:events) { double('Chef::Events').as_null_object } # mock all the methods + let(:run_context) { double('Chef::RunContext', :node => node, :events => events) } + let(:enclosing_directory) { File.expand_path(File.join(CHEF_SPEC_DATA, "templates")) } + let(:resource_path) { File.expand_path(File.join(enclosing_directory, "seattle.txt")) } + + # Subject + + let(:provider) do + provider = described_class.new(resource, run_context) + provider.stub!(:content).and_return(content) + provider + end let(:resource) do resource = Chef::Resource::Template.new("seattle", @run_context) |