diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2010-12-16 14:59:06 -0800 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2010-12-16 14:59:06 -0800 |
| commit | fb8509acbd947712cac094a49227d28a16a366aa (patch) | |
| tree | 18baf44cc35011d0afca34eb75daeb3c5b87a1fb | |
| parent | 480c399f183627f5f588e9dc9f5f86f683c0e468 (diff) | |
| parent | cc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4 (diff) | |
| download | puppet-fb8509acbd947712cac094a49227d28a16a366aa.tar.gz puppet-fb8509acbd947712cac094a49227d28a16a366aa.tar.xz puppet-fb8509acbd947712cac094a49227d28a16a366aa.zip | |
Merge branch '2.6.x' into next
* 2.6.x:
maint: Fix ActiveRecord confine issue
maint: Fix a test that was missing a require
maint: Fix tests that don't run on their own
Manually Resolved Conflicts:
spec/unit/network/http/rack/xmlrpc_spec.rb
spec/unit/network/http/rack_spec.rb
spec/unit/network/http/webrick_spec.rb
spec/unit/parser/templatewrapper_spec.rb
spec/unit/rails/param_value_spec.rb
spec/unit/rails/resource_spec.rb
| -rwxr-xr-x | spec/unit/indirector/catalog/active_record_spec.rb | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/spec/unit/indirector/catalog/active_record_spec.rb b/spec/unit/indirector/catalog/active_record_spec.rb index 71975f014..27310e48e 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 |
