summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRein Henrichs <reinh@reinh.com>2010-04-02 14:25:02 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commitb4b07f5be7b3ad506088746da05597cb30fadd14 (patch)
tree3657dbf875b68c7a5ee00e055168499a8eda41cf
parente7bc19a42f7e4fd128665d9af79bef35096532c9 (diff)
downloadpuppet-b4b07f5be7b3ad506088746da05597cb30fadd14.tar.gz
puppet-b4b07f5be7b3ad506088746da05597cb30fadd14.tar.xz
puppet-b4b07f5be7b3ad506088746da05597cb30fadd14.zip
Fix failing specs
Some variable ns were missed in the rename
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/unit/application/ca.rb12
-rwxr-xr-xspec/unit/application/doc.rb6
-rwxr-xr-xspec/unit/application/puppetrun.rb8
-rw-r--r--spec/unit/application/server.rb2
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