summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-09-13 22:57:48 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-09-13 22:57:48 -0700
commit754ed19a8105a1be01c723a91abf9999ec6a8ab3 (patch)
tree8a3b59432ff56fbaf64d1cb6448e4e228f5359c0 /spec/unit
parent21afb51a1b84116b2a906a6959ae588f45135104 (diff)
parentefa834aaec596b0d5e7b314a53e6b258ce44728c (diff)
downloadpuppet-754ed19a8105a1be01c723a91abf9999ec6a8ab3.tar.gz
puppet-754ed19a8105a1be01c723a91abf9999ec6a8ab3.tar.xz
puppet-754ed19a8105a1be01c723a91abf9999ec6a8ab3.zip
Merge commit '2.6.1rc4'
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/application/apply_spec.rb2
-rwxr-xr-xspec/unit/application/cert_spec.rb2
-rw-r--r--spec/unit/application/master_spec.rb2
-rwxr-xr-xspec/unit/network/http/webrick/rest_spec.rb1
-rwxr-xr-xspec/unit/parser/lexer_spec.rb1
-rwxr-xr-xspec/unit/provider/ssh_authorized_key/parsed_spec.rb6
-rwxr-xr-xspec/unit/reports/tagmail_spec.rb4
-rwxr-xr-xspec/unit/type/file/content_spec.rb1
-rwxr-xr-xspec/unit/util/backups_spec.rb1
9 files changed, 11 insertions, 9 deletions
diff --git a/spec/unit/application/apply_spec.rb b/spec/unit/application/apply_spec.rb
index 8c53136d0..85098f490 100755
--- a/spec/unit/application/apply_spec.rb
+++ b/spec/unit/application/apply_spec.rb
@@ -312,7 +312,7 @@ describe Puppet::Application::Apply do
end
it "should apply the catalog" do
- @catalog.expects(:apply)
+ @catalog.expects(:apply).returns(stub_everything 'transaction')
@apply.main
end
diff --git a/spec/unit/application/cert_spec.rb b/spec/unit/application/cert_spec.rb
index b82a2fe89..4663fc938 100755
--- a/spec/unit/application/cert_spec.rb
+++ b/spec/unit/application/cert_spec.rb
@@ -12,7 +12,7 @@ describe Puppet::Application::Cert do
end
it "should operate in master run_mode" do
- @cert_app.class.run_mode.name.should equal :master
+ @cert_app.class.run_mode.name.should equal(:master)
end
it "should ask Puppet::Application to parse Puppet configuration file" do
diff --git a/spec/unit/application/master_spec.rb b/spec/unit/application/master_spec.rb
index 0baa8229b..216c7dc90 100644
--- a/spec/unit/application/master_spec.rb
+++ b/spec/unit/application/master_spec.rb
@@ -23,7 +23,7 @@ describe Puppet::Application::Master do
end
it "should operate in master run_mode" do
- @master.class.run_mode.name.should equal :master
+ @master.class.run_mode.name.should equal(:master)
end
it "should ask Puppet::Application to parse Puppet configuration file" do
diff --git a/spec/unit/network/http/webrick/rest_spec.rb b/spec/unit/network/http/webrick/rest_spec.rb
index aa2b93176..b00c62dc4 100755
--- a/spec/unit/network/http/webrick/rest_spec.rb
+++ b/spec/unit/network/http/webrick/rest_spec.rb
@@ -2,6 +2,7 @@
require File.dirname(__FILE__) + '/../../../../spec_helper'
require 'puppet/network/http'
+require 'webrick'
require 'puppet/network/http/webrick/rest'
describe Puppet::Network::HTTP::WEBrickREST do
diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb
index 7e51423f4..b27980bf2 100755
--- a/spec/unit/parser/lexer_spec.rb
+++ b/spec/unit/parser/lexer_spec.rb
@@ -644,7 +644,6 @@ end
require 'puppettest/support/utils'
describe "Puppet::Parser::Lexer in the old tests when lexing example files" do
- extend PuppetTest
extend PuppetTest::Support::Utils
textfiles do |file|
it "should correctly lex #{file}" do
diff --git a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
index 059d010bb..648527924 100755
--- a/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
+++ b/spec/unit/provider/ssh_authorized_key/parsed_spec.rb
@@ -3,14 +3,16 @@
require File.dirname(__FILE__) + '/../../../spec_helper'
require 'puppet_spec/files'
-require 'puppettest'
require 'puppettest/support/utils'
require 'puppettest/fileparsing'
+require 'tmpdir'
+require 'puppettest/fakes'
provider_class = Puppet::Type.type(:ssh_authorized_key).provider(:parsed)
describe provider_class do
include PuppetSpec::Files
+ extend PuppetTest::Support::Utils
include PuppetTest
include PuppetTest::FileParsing
@@ -49,7 +51,7 @@ describe provider_class do
@provider.target_object(@keyfile).read
end
- PuppetTest.fakedata("data/providers/ssh_authorized_key/parsed").each { |file|
+ fakedata("data/providers/ssh_authorized_key/parsed").each { |file|
it "should be able to parse example data in #{file}" do
fakedataparse(file)
end
diff --git a/spec/unit/reports/tagmail_spec.rb b/spec/unit/reports/tagmail_spec.rb
index 4349e999d..59cb5b2b8 100755
--- a/spec/unit/reports/tagmail_spec.rb
+++ b/spec/unit/reports/tagmail_spec.rb
@@ -3,12 +3,12 @@
Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
require 'puppet/reports'
-require 'puppettest'
+require 'puppettest/support/utils'
tagmail = Puppet::Reports.report(:tagmail)
describe tagmail do
- extend PuppetTest
+ extend PuppetTest::Support::Utils
before do
@processor = Puppet::Transaction::Report.new
diff --git a/spec/unit/type/file/content_spec.rb b/spec/unit/type/file/content_spec.rb
index a01a14a59..cde643fc8 100755
--- a/spec/unit/type/file/content_spec.rb
+++ b/spec/unit/type/file/content_spec.rb
@@ -6,6 +6,7 @@ content = Puppet::Type.type(:file).attrclass(:content)
describe content do
before do
@resource = Puppet::Type.type(:file).new :path => "/foo/bar"
+ content.stubs(:standalone?).returns(false)
end
it "should be a subclass of Property" do
diff --git a/spec/unit/util/backups_spec.rb b/spec/unit/util/backups_spec.rb
index 5c10d4c3c..259b18652 100755
--- a/spec/unit/util/backups_spec.rb
+++ b/spec/unit/util/backups_spec.rb
@@ -3,7 +3,6 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require 'puppet/util/backups'
-include PuppetTest
describe Puppet::Util::Backups do
before do