summaryrefslogtreecommitdiff
path: root/spec/unit/resource_spec.rb
diff options
context:
space:
mode:
authorXabier de Zuazo <xabier@zuazo.org>2013-01-18 13:12:44 +0100
committerBryan McLellan <btm@opscode.com>2013-06-19 14:18:43 -0700
commitff7300125e1123dd03e2d53e9f36b6c4b23674a4 (patch)
treed3d80d54275664739848fd82559e6e49d7139776 /spec/unit/resource_spec.rb
parent2c25de2828f8a959acd5542730ad15a0136fd3ee (diff)
downloadchef-ff7300125e1123dd03e2d53e9f36b6c4b23674a4.tar.gz
[CHEF-972] added test for checking doc formatter output when action is :nothing
Diffstat (limited to 'spec/unit/resource_spec.rb')
-rw-r--r--spec/unit/resource_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index a25f180cf7..dd1a0259e4 100644
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -587,6 +587,13 @@ describe Chef::Resource do
@resource.should_skip?(:nothing).should be_true
end
+ it "should print \"skipped due to action :nothing\" message for doc formatter when action is :nothing" do
+ fdoc = Chef::Formatters.new(:doc, STDOUT, STDERR)
+ @run_context.stub!(:events).and_return(fdoc)
+ fdoc.should_receive(:puts).with(" (skipped due to action :nothing)")
+ @resource.should_skip?(:nothing)
+ end
+
end
describe "when resource action is :nothing" do