diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2010-12-16 14:50:39 -0800 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2010-12-16 14:50:39 -0800 |
| commit | cc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4 (patch) | |
| tree | 2be10cd07b1c8c45d63ec38adb7f35927841b864 | |
| parent | 52ca8c78c270b93ce997217900a3d333ad8154cc (diff) | |
| parent | b4035315aaad37df97d4e620b4f972cad201d04f (diff) | |
| download | puppet-cc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4.tar.gz puppet-cc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4.tar.xz puppet-cc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4.zip | |
Merge branch '2.6.next' into 2.6.x
* 2.6.next:
maint: Fix ActiveRecord confine issue
maint: Fix a test that was missing a require
maint: Fix tests that don't run on their own
| -rw-r--r-- | lib/puppet/parser/templatewrapper.rb | 1 | ||||
| -rwxr-xr-x | spec/integration/defaults_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/application/agent_spec.rb | 1 | ||||
| -rw-r--r-- | spec/unit/application/filebucket_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/application/queue_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/indirector/active_record_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/indirector/catalog/active_record_spec.rb | 27 | ||||
| -rwxr-xr-x | spec/unit/indirector/facts/active_record_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/network/http/rack/xmlrpc_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/network/http/rack_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/network/http/webrick_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/network/xmlrpc/client_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/parser/collector_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/parser/templatewrapper_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/rails/param_value_spec.rb | 1 | ||||
| -rwxr-xr-x | spec/unit/rails/resource_spec.rb | 1 |
16 files changed, 30 insertions, 12 deletions
diff --git a/lib/puppet/parser/templatewrapper.rb b/lib/puppet/parser/templatewrapper.rb index 73a4ad8aa..6864aa1a9 100644 --- a/lib/puppet/parser/templatewrapper.rb +++ b/lib/puppet/parser/templatewrapper.rb @@ -1,6 +1,7 @@ # A simple wrapper for templates, so they don't have full access to # the scope objects. require 'puppet/parser/files' +require 'erb' class Puppet::Parser::TemplateWrapper attr_writer :scope diff --git a/spec/integration/defaults_spec.rb b/spec/integration/defaults_spec.rb index 1f90c7cbc..2f30014e8 100755 --- a/spec/integration/defaults_spec.rb +++ b/spec/integration/defaults_spec.rb @@ -3,6 +3,7 @@ require File.dirname(__FILE__) + '/../spec_helper' require 'puppet/defaults' +require 'puppet/rails' describe "Puppet defaults" do include Puppet::Util::Execution diff --git a/spec/unit/application/agent_spec.rb b/spec/unit/application/agent_spec.rb index 54726c185..ff504eedf 100755 --- a/spec/unit/application/agent_spec.rb +++ b/spec/unit/application/agent_spec.rb @@ -5,6 +5,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' require 'puppet/agent' require 'puppet/application/agent' require 'puppet/network/server' +require 'puppet/network/handler' require 'puppet/daemon' describe Puppet::Application::Agent do diff --git a/spec/unit/application/filebucket_spec.rb b/spec/unit/application/filebucket_spec.rb index 6e7a7b819..e6272f179 100644 --- a/spec/unit/application/filebucket_spec.rb +++ b/spec/unit/application/filebucket_spec.rb @@ -3,6 +3,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' require 'puppet/application/filebucket' +require 'puppet/file_bucket/dipper' describe Puppet::Application::Filebucket do before :each do diff --git a/spec/unit/application/queue_spec.rb b/spec/unit/application/queue_spec.rb index 87c96dfff..bd0d53ab1 100755 --- a/spec/unit/application/queue_spec.rb +++ b/spec/unit/application/queue_spec.rb @@ -3,6 +3,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' require 'puppet/application/queue' +require 'puppet/indirector/catalog/queue' describe Puppet::Application::Queue do before :each do diff --git a/spec/unit/indirector/active_record_spec.rb b/spec/unit/indirector/active_record_spec.rb index 258c4e793..40af146c8 100755 --- a/spec/unit/indirector/active_record_spec.rb +++ b/spec/unit/indirector/active_record_spec.rb @@ -2,6 +2,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' +require 'puppet/rails' require 'puppet/indirector/active_record' describe Puppet::Indirector::ActiveRecord do diff --git a/spec/unit/indirector/catalog/active_record_spec.rb b/spec/unit/indirector/catalog/active_record_spec.rb index df61d59d7..ba8f1dad9 100755 --- a/spec/unit/indirector/catalog/active_record_spec.rb +++ b/spec/unit/indirector/catalog/active_record_spec.rb @@ -7,20 +7,23 @@ describe "Puppet::Resource::Catalog::ActiveRecord" do confine "Missing Rails" => Puppet.features.rails? require 'puppet/rails' - class Tableless < ActiveRecord::Base - def self.columns - @columns ||= [] - end - def self.column(name, sql_type=nil, default=nil, null=true) - columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) + + before :all do + class Tableless < ActiveRecord::Base + def self.columns + @columns ||= [] + end + def self.column(name, sql_type=nil, default=nil, null=true) + columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) + end end - end - class Host < Tableless - column :name, :string, :null => false - column :ip, :string - column :environment, :string - column :last_compile, :datetime + class Host < Tableless + column :name, :string, :null => false + column :ip, :string + column :environment, :string + column :last_compile, :datetime + end end before do diff --git a/spec/unit/indirector/facts/active_record_spec.rb b/spec/unit/indirector/facts/active_record_spec.rb index 0cdb70e01..0bdcfcb77 100755 --- a/spec/unit/indirector/facts/active_record_spec.rb +++ b/spec/unit/indirector/facts/active_record_spec.rb @@ -2,6 +2,7 @@ require File.dirname(__FILE__) + '/../../../spec_helper' +require 'puppet/rails' require 'puppet/node/facts' describe "Puppet::Node::Facts::ActiveRecord" do diff --git a/spec/unit/network/http/rack/xmlrpc_spec.rb b/spec/unit/network/http/rack/xmlrpc_spec.rb index 63ba28bf2..870438f2c 100755 --- a/spec/unit/network/http/rack/xmlrpc_spec.rb +++ b/spec/unit/network/http/rack/xmlrpc_spec.rb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../../../spec_helper' +require 'puppet/network/handler' require 'puppet/network/http/rack' if Puppet.features.rack? require 'puppet/network/http/rack/xmlrpc' if Puppet.features.rack? diff --git a/spec/unit/network/http/rack_spec.rb b/spec/unit/network/http/rack_spec.rb index df42a1ffa..8be9ccb50 100755 --- a/spec/unit/network/http/rack_spec.rb +++ b/spec/unit/network/http/rack_spec.rb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../../spec_helper' +require 'puppet/network/handler' require 'puppet/network/http/rack' if Puppet.features.rack? describe "Puppet::Network::HTTP::Rack" do diff --git a/spec/unit/network/http/webrick_spec.rb b/spec/unit/network/http/webrick_spec.rb index 2a6ef2268..8e7c92b71 100755 --- a/spec/unit/network/http/webrick_spec.rb +++ b/spec/unit/network/http/webrick_spec.rb @@ -4,6 +4,7 @@ # Copyright (c) 2007. All rights reserved. require File.dirname(__FILE__) + '/../../../spec_helper' +require 'puppet/network/handler' require 'puppet/network/http' require 'puppet/network/http/webrick' diff --git a/spec/unit/network/xmlrpc/client_spec.rb b/spec/unit/network/xmlrpc/client_spec.rb index 0b9b2b095..8440d39fa 100755 --- a/spec/unit/network/xmlrpc/client_spec.rb +++ b/spec/unit/network/xmlrpc/client_spec.rb @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +require 'puppet/network/client' Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") } diff --git a/spec/unit/parser/collector_spec.rb b/spec/unit/parser/collector_spec.rb index 15808d6ff..908cda63a 100755 --- a/spec/unit/parser/collector_spec.rb +++ b/spec/unit/parser/collector_spec.rb @@ -2,6 +2,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' +require 'puppet/rails' require 'puppet/parser/collector' describe Puppet::Parser::Collector, "when initializing" do diff --git a/spec/unit/parser/templatewrapper_spec.rb b/spec/unit/parser/templatewrapper_spec.rb index d4d1d1b8e..68d90a1cc 100755 --- a/spec/unit/parser/templatewrapper_spec.rb +++ b/spec/unit/parser/templatewrapper_spec.rb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../spec_helper' +require 'puppet/parser/templatewrapper' describe Puppet::Parser::TemplateWrapper do before(:each) do diff --git a/spec/unit/rails/param_value_spec.rb b/spec/unit/rails/param_value_spec.rb index d6dc7d57b..243456e89 100755 --- a/spec/unit/rails/param_value_spec.rb +++ b/spec/unit/rails/param_value_spec.rb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../spec_helper' +require 'puppet/rails' describe "Puppet::Rails::ParamValue" do confine "Cannot test without ActiveRecord" => Puppet.features.rails? diff --git a/spec/unit/rails/resource_spec.rb b/spec/unit/rails/resource_spec.rb index 73c7f7af4..6e23d2020 100755 --- a/spec/unit/rails/resource_spec.rb +++ b/spec/unit/rails/resource_spec.rb @@ -1,6 +1,7 @@ #!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../spec_helper' +require 'puppet/rails' describe "Puppet::Rails::Resource" do confine "Cannot test without ActiveRecord" => Puppet.features.rails? |
