summaryrefslogtreecommitdiffstats
path: root/spec/unit/rails
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-01-03 22:19:41 -0800
committerNick Lewis <nick@puppetlabs.com>2011-01-04 16:01:41 -0800
commit52760a4fb2764d011609c82adb68cc61d0772dc4 (patch)
tree489df98ee50d6ac6cf01fb905e78bd4864cde2c0 /spec/unit/rails
parentac114371fc161a48fc48bf68944846a1defbc6c4 (diff)
downloadpuppet-52760a4fb2764d011609c82adb68cc61d0772dc4.tar.gz
puppet-52760a4fb2764d011609c82adb68cc61d0772dc4.tar.xz
puppet-52760a4fb2764d011609c82adb68cc61d0772dc4.zip
(#5771) Upgrade rspec to version 2
The biggest change is that we no longer need to monkey patch rspec to get confine behavior. Describe blocks can now be conditional like confine used to be. "describe" blocks with "shared => true" are now "shared_examples_for". Paired-With: Nick Lewis
Diffstat (limited to 'spec/unit/rails')
-rwxr-xr-xspec/unit/rails/host_spec.rb4
-rwxr-xr-xspec/unit/rails/param_value_spec.rb4
-rwxr-xr-xspec/unit/rails/resource_spec.rb4
3 files changed, 3 insertions, 9 deletions
diff --git a/spec/unit/rails/host_spec.rb b/spec/unit/rails/host_spec.rb
index 324a673a9..4244f117f 100755
--- a/spec/unit/rails/host_spec.rb
+++ b/spec/unit/rails/host_spec.rb
@@ -2,9 +2,7 @@
require File.dirname(__FILE__) + '/../../spec_helper'
-describe "Puppet::Rails::Host" do
- confine "Cannot test without ActiveRecord" => Puppet.features.rails?
-
+describe "Puppet::Rails::Host", :if => Puppet.features.rails? do
def column(name, type)
ActiveRecord::ConnectionAdapters::Column.new(name, nil, type, false)
end
diff --git a/spec/unit/rails/param_value_spec.rb b/spec/unit/rails/param_value_spec.rb
index 243456e89..f67022a14 100755
--- a/spec/unit/rails/param_value_spec.rb
+++ b/spec/unit/rails/param_value_spec.rb
@@ -3,9 +3,7 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require 'puppet/rails'
-describe "Puppet::Rails::ParamValue" do
- confine "Cannot test without ActiveRecord" => Puppet.features.rails?
-
+describe "Puppet::Rails::ParamValue", :if => Puppet.features.rails? do
def column(name, type)
ActiveRecord::ConnectionAdapters::Column.new(name, nil, type, false)
end
diff --git a/spec/unit/rails/resource_spec.rb b/spec/unit/rails/resource_spec.rb
index 6e23d2020..e5bd8a6c9 100755
--- a/spec/unit/rails/resource_spec.rb
+++ b/spec/unit/rails/resource_spec.rb
@@ -3,9 +3,7 @@
require File.dirname(__FILE__) + '/../../spec_helper'
require 'puppet/rails'
-describe "Puppet::Rails::Resource" do
- confine "Cannot test without ActiveRecord" => Puppet.features.rails?
-
+describe "Puppet::Rails::Resource", :if => Puppet.features.rails? do
def column(name, type)
ActiveRecord::ConnectionAdapters::Column.new(name, nil, type, false)
end