From b4b07f5be7b3ad506088746da05597cb30fadd14 Mon Sep 17 00:00:00 2001 From: Rein Henrichs Date: Fri, 2 Apr 2010 14:25:02 -0700 Subject: Fix failing specs Some variable ns were missed in the rename --- spec/spec_helper.rb | 2 +- spec/unit/application/ca.rb | 12 ++++++------ spec/unit/application/doc.rb | 6 +++--- spec/unit/application/puppetrun.rb | 8 ++++---- spec/unit/application/server.rb | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0a603cd3b..b57dab36c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -18,7 +18,7 @@ end require 'puppettest' require 'puppettest/runnable_test' require 'mocha' -gem 'rspec', '=1.2.9' +gem 'rspec', '>=1.2.9' require 'spec/autorun' # So everyone else doesn't have to include this base constant. diff --git a/spec/unit/application/ca.rb b/spec/unit/application/ca.rb index b9a716e3f..8432e65f3 100644 --- a/spec/unit/application/ca.rb +++ b/spec/unit/application/ca.rb @@ -40,9 +40,9 @@ describe "PuppetCA" do end it "should set the fingerprint digest with the --digest option" do - @puppetca.handle_digest(:digest) + @ca_app.handle_digest(:digest) - @puppetca.digest.should == :digest + @ca_app.digest.should == :digest end it "should set mode to :destroy for --clean" do @@ -137,11 +137,11 @@ describe "PuppetCA" do it "should send the currently set digest" do ARGV.stubs(:collect).returns(["host"]) - @puppetca.handle_digest(:digest) + @ca_app.handle_digest(:digest) @ca.expects(:apply).with { |mode,to| to[:digest] == :digest} - @puppetca.main + @ca_app.main end it "should delegate to ca.apply with current set mode" do @@ -154,13 +154,13 @@ describe "PuppetCA" do end it "should revoke cert if mode is clean" do - @puppetca.mode = :destroy + @ca_app.mode = :destroy ARGV.stubs(:collect).returns(["host"]) @ca.expects(:apply).with { |mode,to| mode == :revoke } @ca.expects(:apply).with { |mode,to| mode == :destroy } - @puppetca.main + @ca_app.main end end diff --git a/spec/unit/application/doc.rb b/spec/unit/application/doc.rb index e5d7e1aa5..267a70d8b 100755 --- a/spec/unit/application/doc.rb +++ b/spec/unit/application/doc.rb @@ -325,9 +325,9 @@ describe "doc" do end it "should call Puppet::Util::RDoc.rdoc in full mode with outputdir set to doc if no --outputdir" do - @puppetdoc.options.expects(:[]).with(:outputdir).returns(false) + @doc.options.expects(:[]).with(:outputdir).returns(false) Puppet::Util::RDoc.expects(:rdoc).with('doc', ['modules','manifests']) - @puppetdoc.rdoc + @doc.rdoc end it "should call Puppet::Util::RDoc.manifestdoc in manifest mode" do @@ -342,7 +342,7 @@ describe "doc" do Puppet::Util::RDoc.expects(:rdoc).with('doc', ['envmodules1','envmodules2','envmanifests']) - @puppetdoc.rdoc + @doc.rdoc end end diff --git a/spec/unit/application/puppetrun.rb b/spec/unit/application/puppetrun.rb index 13b61b90e..271fd6ca4 100755 --- a/spec/unit/application/puppetrun.rb +++ b/spec/unit/application/puppetrun.rb @@ -145,13 +145,13 @@ describe "run" do end it "should pass the fqdn option to search" do - @puppetrun.options.stubs(:[]).with(:fqdn).returns(:something) - @puppetrun.options.stubs(:[]).with(:all).returns(true) - @puppetrun.stubs(:puts) + @run.options.stubs(:[]).with(:fqdn).returns(:something) + @run.options.stubs(:[]).with(:all).returns(true) + @run.stubs(:puts) Puppet::Node.expects(:search).with("whatever",:fqdn => :something).returns([]) - @puppetrun.run_setup + @run.run_setup end it "should search for all nodes if --all" do diff --git a/spec/unit/application/server.rb b/spec/unit/application/server.rb index 53de19f5b..52b8d4751 100644 --- a/spec/unit/application/server.rb +++ b/spec/unit/application/server.rb @@ -177,7 +177,7 @@ describe "PuppetMaster" do end it "should tell Puppet.settings to use :main,:ssl and :server_app category" do - Puppet.settings.expects(:use).with(:main,:server_app,:ssl) + Puppet.settings.expects(:use).with(:main,:puppetmasterd,:ssl) @server_app.run_setup end -- cgit