summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2010-07-02 22:19:28 -0700
committerJames Turnbull <james@lovedthanlost.net>2010-09-03 02:53:01 +1000
commit07d0be4684f75e6edc6fbb5d1397dd79b8ca2b6b (patch)
tree9e8aa9c180f8cdff17bc6c000f9d4ce5dcc560d8 /spec/unit
parent9e696164237821fb6b48a913395240d376f8c3da (diff)
downloadpuppet-07d0be4684f75e6edc6fbb5d1397dd79b8ca2b6b.tar.gz
puppet-07d0be4684f75e6edc6fbb5d1397dd79b8ca2b6b.tar.xz
puppet-07d0be4684f75e6edc6fbb5d1397dd79b8ca2b6b.zip
[#4308] Remove puppettest from specs
The less stuff being done in the spec_helper the better for reasoning about what's happening in the tests. puppettest.rb does a lot of things that aren't necessary for the specs, so this patch gets those things out of the spec_helper. Reviewed by: Jesse Wolfe
Diffstat (limited to 'spec/unit')
-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/util/backups_spec.rb1
5 files changed, 7 insertions, 6 deletions
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/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