diff options
author | Luke Kanies <luke@puppetlabs.com> | 2010-04-09 17:03:41 -0700 |
---|---|---|
committer | Luke Kanies <luke@puppetlabs.com> | 2010-04-09 17:03:41 -0700 |
commit | 6cd6c47efa75be82a5cb3e366caaa3bccfe33756 (patch) | |
tree | ddca6a34da1cde448448e8c710f4709dc48c1c77 /spec | |
parent | a27013ac1980ad3978a68794396c15cfffa81a86 (diff) | |
download | puppet-6cd6c47efa75be82a5cb3e366caaa3bccfe33756.tar.gz puppet-6cd6c47efa75be82a5cb3e366caaa3bccfe33756.tar.xz puppet-6cd6c47efa75be82a5cb3e366caaa3bccfe33756.zip |
Renaming and fixing puppetrun tests.
Signed-off-by: Luke Kanies <luke@puppetlabs.com>
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/application/run.rb (renamed from spec/unit/application/puppetrun.rb) | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/unit/application/puppetrun.rb b/spec/unit/application/run.rb index f8ca48061..bb76c5b59 100755 --- a/spec/unit/application/puppetrun.rb +++ b/spec/unit/application/run.rb @@ -250,21 +250,21 @@ describe "run" do options = { :background => true, :ignoreschedules => false, :tags => [] } - @run = Puppet::Run.new( options.dup ) - @run.stubs(:status).returns("success") + @agent_run = Puppet::Run.new( options.dup ) + @agent_run.stubs(:status).returns("success") Puppet::Run.indirection.expects(:terminus_class=).with( :rest ) - Puppet::Run.expects(:new).with( options ).returns(@run) + Puppet::Run.expects(:new).with( options ).returns(@agent_run) end it "should call run on a Puppet::Run for the given host" do - @run.expects(:save).with('https://host:8139/production/run/host').returns(@run) + @agent_run.expects(:save).with('https://host:8139/production/run/host').returns(@agent_run) @run.run_for_host('host') end it "should exit the child with 0 on success" do - @run.stubs(:status).returns("success") + @agent_run.stubs(:status).returns("success") @run.expects(:exit).with(0) @@ -272,7 +272,7 @@ describe "run" do end it "should exit the child with 3 on running" do - @run.stubs(:status).returns("running") + @agent_run.stubs(:status).returns("running") @run.expects(:exit).with(3) @@ -280,7 +280,7 @@ describe "run" do end it "should exit the child with 12 on unknown answer" do - @run.stubs(:status).returns("whatever") + @agent_run.stubs(:status).returns("whatever") @run.expects(:exit).with(12) |