summaryrefslogtreecommitdiffstats
path: root/spec/unit/application
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-16 23:28:17 -0500
committerJames Turnbull <james@lovedthanlost.net>2009-04-17 16:17:58 +1000
commit47933347797b61e8a8ba71980396862fddd950f0 (patch)
tree11120b1de5d7716bce35b1854029ab33613d7d14 /spec/unit/application
parent7398fa171fdd6dcaeb2d8fd1c07a23bbd78891d0 (diff)
downloadpuppet-47933347797b61e8a8ba71980396862fddd950f0.tar.gz
puppet-47933347797b61e8a8ba71980396862fddd950f0.tar.xz
puppet-47933347797b61e8a8ba71980396862fddd950f0.zip
Fixing puppet -e; it got broken in the move to Application
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/application')
-rw-r--r--spec/unit/application/puppet.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/application/puppet.rb b/spec/unit/application/puppet.rb
index 13b572d8f..0fbfbe591 100644
--- a/spec/unit/application/puppet.rb
+++ b/spec/unit/application/puppet.rb
@@ -11,7 +11,7 @@ describe "Puppet" do
Puppet::Util::Log.stubs(:level=)
end
- [:debug,:execute,:loadclasses,:verbose,:use_nodes,:detailed_exitcodes].each do |option|
+ [:debug,:loadclasses,:verbose,:use_nodes,:detailed_exitcodes].each do |option|
it "should declare handle_#{option} method" do
@puppet.should respond_to("handle_#{option}".to_sym)
end
@@ -22,6 +22,11 @@ describe "Puppet" do
end
end
+ it "should set the code to the provided code when :execute is used" do
+ @puppet.options.expects(:[]=).with(:code, 'arg')
+ @puppet.send("handle_execute".to_sym, 'arg')
+ end
+
it "should ask Puppet::Application to parse Puppet configuration file" do
@puppet.should_parse_config?.should be_true
end