summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPieter van de Bruggen <pieter@puppetlabs.com>2011-05-17 14:50:40 -0700
committerPieter van de Bruggen <pieter@puppetlabs.com>2011-05-17 14:50:40 -0700
commitf9e44f041b3fdc120b1c78554c35c83f7517152e (patch)
treef5d4687277fff6fe697a92089f1fa9283dce1bb4
parent99d437d2bbc2339f092304715ec562fbbcb0a50c (diff)
parentc8b294a0b0a1fc91a64c0a1ac3bab3b2aec92faf (diff)
downloadpuppet-f9e44f041b3fdc120b1c78554c35c83f7517152e.tar.gz
puppet-f9e44f041b3fdc120b1c78554c35c83f7517152e.tar.xz
puppet-f9e44f041b3fdc120b1c78554c35c83f7517152e.zip
Merge branch '2.7.x' into 2.7.next
-rw-r--r--lib/puppet/face/certificate.rb2
-rw-r--r--lib/puppet/face/resource.rb2
-rw-r--r--lib/puppet/interface/action.rb2
-rw-r--r--lib/puppet/interface/action_builder.rb4
-rw-r--r--lib/puppet/interface/option_builder.rb4
-rw-r--r--lib/puppet/network/client.rb2
-rw-r--r--lib/puppet/network/format.rb2
-rw-r--r--lib/puppet/resource.rb2
-rw-r--r--lib/puppet/util.rb1
-rw-r--r--lib/puppet/util/selinux.rb2
-rwxr-xr-xspec/integration/application/doc_spec.rb2
-rwxr-xr-xspec/integration/network/formats_spec.rb2
-rwxr-xr-xspec/integration/network/server/mongrel_spec.rb2
-rwxr-xr-xspec/integration/node_spec.rb2
-rwxr-xr-xspec/integration/provider/package_spec.rb2
-rwxr-xr-xspec/integration/provider/service/init_spec.rb4
-rwxr-xr-xspec/integration/transaction_spec.rb2
-rwxr-xr-xspec/integration/util/file_locking_spec.rb2
-rwxr-xr-xspec/integration/util/rdoc/parser_spec.rb2
-rwxr-xr-xspec/lib/puppet/face/huzzah.rb2
-rw-r--r--spec/lib/puppet/face/version_matching.rb2
-rwxr-xr-xspec/unit/application/cert_spec.rb2
-rwxr-xr-xspec/unit/application/face_base_spec.rb2
-rwxr-xr-xspec/unit/application/facts_spec.rb2
-rwxr-xr-xspec/unit/application/resource_spec.rb4
-rwxr-xr-xspec/unit/application_spec.rb4
-rwxr-xr-xspec/unit/indirector/facts/couch_spec.rb4
-rwxr-xr-xspec/unit/indirector/ldap_spec.rb2
-rwxr-xr-xspec/unit/indirector/report/yaml_spec.rb2
-rwxr-xr-xspec/unit/indirector/resource/ral_spec.rb2
-rwxr-xr-xspec/unit/indirector/terminus_spec.rb8
-rwxr-xr-xspec/unit/interface/action_builder_spec.rb42
-rwxr-xr-xspec/unit/interface/action_manager_spec.rb70
-rwxr-xr-xspec/unit/interface/action_spec.rb59
-rwxr-xr-xspec/unit/interface_spec.rb8
-rwxr-xr-xspec/unit/network/handler/fileserver_spec.rb2
-rwxr-xr-xspec/unit/network/http/mongrel/rest_spec.rb2
-rwxr-xr-xspec/unit/network/http/mongrel_spec.rb8
-rwxr-xr-xspec/unit/network/http/webrick/rest_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/function_spec.rb2
-rwxr-xr-xspec/unit/parser/ast/selector_spec.rb2
-rwxr-xr-xspec/unit/parser/compiler_spec.rb4
-rwxr-xr-xspec/unit/parser/functions/create_resources_spec.rb4
-rwxr-xr-xspec/unit/parser/functions/inline_template_spec.rb2
-rwxr-xr-xspec/unit/parser/functions/shellquote_spec.rb6
-rwxr-xr-xspec/unit/parser/functions/template_spec.rb2
-rwxr-xr-xspec/unit/parser/resource_spec.rb2
-rwxr-xr-xspec/unit/provider/mount/parsed_spec.rb2
-rwxr-xr-xspec/unit/provider/package/macports_spec.rb4
-rwxr-xr-xspec/unit/provider/service/init_spec.rb2
-rwxr-xr-xspec/unit/provider/service/src_spec.rb10
-rwxr-xr-xspec/unit/provider/user/user_role_add_spec.rb4
-rwxr-xr-xspec/unit/provider/zpool/solaris_spec.rb2
-rwxr-xr-xspec/unit/resource/status_spec.rb2
-rwxr-xr-xspec/unit/resource_spec.rb2
-rwxr-xr-xspec/unit/simple_graph_spec.rb2
-rwxr-xr-xspec/unit/ssl/certificate_authority/interface_spec.rb2
-rwxr-xr-xspec/unit/ssl/host_spec.rb2
-rwxr-xr-xspec/unit/transaction/event_spec.rb10
-rwxr-xr-xspec/unit/type/augeas_spec.rb2
-rwxr-xr-xspec/unit/type/file_spec.rb6
-rwxr-xr-xspec/unit/type/group_spec.rb4
-rwxr-xr-xspec/unit/type/resources_spec.rb2
-rwxr-xr-xspec/unit/type/schedule_spec.rb18
-rwxr-xr-xspec/unit/util/autoload_spec.rb4
-rwxr-xr-xspec/unit/util/cacher_spec.rb2
-rwxr-xr-xspec/unit/util/file_locking_spec.rb4
-rwxr-xr-xspec/unit/util/log_spec.rb4
-rwxr-xr-xspec/unit/util/network_device/cisco/device_spec.rb4
-rwxr-xr-xspec/unit/util/network_device/transport/ssh_spec.rb2
-rwxr-xr-xspec/unit/util/pson_spec.rb2
-rwxr-xr-xspec/unit/util/queue/stomp_spec.rb4
-rwxr-xr-xspec/unit/util/rdoc/parser_spec.rb2
-rwxr-xr-xspec/unit/util/rdoc_spec.rb2
-rwxr-xr-xspec/unit/util/selinux_spec.rb4
75 files changed, 203 insertions, 203 deletions
diff --git a/lib/puppet/face/certificate.rb b/lib/puppet/face/certificate.rb
index ee2b2873f..859946623 100644
--- a/lib/puppet/face/certificate.rb
+++ b/lib/puppet/face/certificate.rb
@@ -8,7 +8,7 @@ Puppet::Indirector::Face.define(:certificate, '0.0.1') do
summary "Provide access to the CA for certificate management"
description <<-EOT
This face interacts with a local or remote Puppet certificate
- authority. Currently, its behavior is not a full superset of puppet
+ authority. Currently, its behavior is not a full superset of puppet
cert; specifically, it is unable to mimic puppet cert's "clean" option,
and its "generate" action submits a CSR rather than creating a
signed certificate.
diff --git a/lib/puppet/face/resource.rb b/lib/puppet/face/resource.rb
index ed6360888..87e587624 100644
--- a/lib/puppet/face/resource.rb
+++ b/lib/puppet/face/resource.rb
@@ -7,7 +7,7 @@ Puppet::Indirector::Face.define(:resource, '0.0.1') do
summary "Interact directly with resources via the RAL, like ralsh"
description <<-EOT
This face provides a Ruby API with functionality similar to the puppet
- resource (née ralsh) command line application. It is not intended to be
+ resource (originally ralsh) command line application. It is not intended to be
used from the command line.
EOT
notes <<-EOT
diff --git a/lib/puppet/interface/action.rb b/lib/puppet/interface/action.rb
index 622371a4e..3c377a49f 100644
--- a/lib/puppet/interface/action.rb
+++ b/lib/puppet/interface/action.rb
@@ -192,7 +192,7 @@ class Puppet::Interface::Action
# but will on 1.9.2, which treats it as "no arguments". Which bites,
# because this just begs for us to wind up in the horrible situation
# where a 1.8 vs 1.9 error bites our end users. --daniel 2011-04-19
- raise ArgumentError, "action when_invoked requires at least one argument (options)"
+ raise ArgumentError, "when_invoked requires at least one argument (options) for action #{@name}"
elsif arity > 0 then
range = Range.new(1, arity - 1)
decl = range.map { |x| "arg#{x}" } << "options = {}"
diff --git a/lib/puppet/interface/action_builder.rb b/lib/puppet/interface/action_builder.rb
index 62db8de06..4948f5fab 100644
--- a/lib/puppet/interface/action_builder.rb
+++ b/lib/puppet/interface/action_builder.rb
@@ -49,9 +49,9 @@ class Puppet::Interface::ActionBuilder
# Metaprogram the simple DSL from the target class.
Puppet::Interface::Action.instance_methods.grep(/=$/).each do |setter|
next if setter =~ /^=/
- property = setter.sub(/=$/, '')
+ property = setter.to_s.chomp('=')
- unless public_instance_methods.include? property
+ unless method_defined? property
# Using eval because the argument handling semantics are less awful than
# when we use the define_method/block version. The later warns on older
# Ruby versions if you pass the wrong number of arguments, but carries
diff --git a/lib/puppet/interface/option_builder.rb b/lib/puppet/interface/option_builder.rb
index 8f358c222..5676ec977 100644
--- a/lib/puppet/interface/option_builder.rb
+++ b/lib/puppet/interface/option_builder.rb
@@ -18,9 +18,9 @@ class Puppet::Interface::OptionBuilder
# Metaprogram the simple DSL from the option class.
Puppet::Interface::Option.instance_methods.grep(/=$/).each do |setter|
next if setter =~ /^=/
- dsl = setter.sub(/=$/, '')
+ dsl = setter.to_s.chomp('=')
- unless private_instance_methods.include? dsl
+ unless private_method_defined? dsl
define_method(dsl) do |value| @option.send(setter, value) end
end
end
diff --git a/lib/puppet/network/client.rb b/lib/puppet/network/client.rb
index cd88b9d84..c56b21393 100644
--- a/lib/puppet/network/client.rb
+++ b/lib/puppet/network/client.rb
@@ -23,7 +23,7 @@ class Net::HTTP
# JJM: This is a "backport" of sorts to older ruby versions which
# do not have this accessor. See #896 for more information.
- attr_accessor :enable_post_connection_check unless Net::HTTP.instance_methods.include? "enable_post_connection_check"
+ attr_accessor :enable_post_connection_check unless Net::HTTP.method_defined? "enable_post_connection_check"
end
# The base class for all of the clients. Many clients just directly
diff --git a/lib/puppet/network/format.rb b/lib/puppet/network/format.rb
index 9cd6cf0b5..69895c344 100644
--- a/lib/puppet/network/format.rb
+++ b/lib/puppet/network/format.rb
@@ -106,6 +106,6 @@ class Puppet::Network::Format
method = send(name)
- return(type == :class ? klass.respond_to?(method) : klass.instance_methods.include?(method))
+ return(type == :class ? klass.respond_to?(method) : klass.method_defined?(method))
end
end
diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb
index 214516908..59e387d00 100644
--- a/lib/puppet/resource.rb
+++ b/lib/puppet/resource.rb
@@ -269,7 +269,7 @@ class Puppet::Resource
else
" %-#{attr_max}s => %s,\n" % [ k, "\'#{v}\'" ]
end
- }
+ }.join
"%s { '%s':\n%s}" % [self.type.to_s.downcase, self.title, attributes]
end
diff --git a/lib/puppet/util.rb b/lib/puppet/util.rb
index d06f44808..ce9d4642b 100644
--- a/lib/puppet/util.rb
+++ b/lib/puppet/util.rb
@@ -1,5 +1,6 @@
# A module to collect utility functions.
+require 'English'
require 'puppet/util/monkey_patches'
require 'sync'
require 'puppet/external/lock'
diff --git a/lib/puppet/util/selinux.rb b/lib/puppet/util/selinux.rb
index cec8a57d9..255388d58 100644
--- a/lib/puppet/util/selinux.rb
+++ b/lib/puppet/util/selinux.rb
@@ -140,7 +140,7 @@ module Puppet::Util::SELinux
def read_mounts
mounts = ""
begin
- if File.instance_methods.include? "read_nonblock"
+ if File.method_defined? "read_nonblock"
# If possible we use read_nonblock in a loop rather than read to work-
# a linux kernel bug. See ticket #1963 for details.
mountfh = File.open("/proc/mounts")
diff --git a/spec/integration/application/doc_spec.rb b/spec/integration/application/doc_spec.rb
index c1e463033..9412976f0 100755
--- a/spec/integration/application/doc_spec.rb
+++ b/spec/integration/application/doc_spec.rb
@@ -5,7 +5,7 @@ require 'puppet_spec/files'
describe Puppet::Application::Doc do
include PuppetSpec::Files
- it "should not generate an error when module dir overlaps parent of site.pp (#4798)" do
+ it "should not generate an error when module dir overlaps parent of site.pp (#4798)", :'fails_on_ruby_1.9.2' => true do
begin
# Note: the directory structure below is more complex than it
# needs to be, but it's representative of the directory structure
diff --git a/spec/integration/network/formats_spec.rb b/spec/integration/network/formats_spec.rb
index af505f267..214b2d78f 100755
--- a/spec/integration/network/formats_spec.rb
+++ b/spec/integration/network/formats_spec.rb
@@ -44,7 +44,7 @@ describe Puppet::Network::FormatHandler.format(:s) do
end
end
-describe Puppet::Network::FormatHandler.format(:pson) do
+describe Puppet::Network::FormatHandler.format(:pson), :'fails_on_ruby_1.9.2' => true do
describe "when pson is absent", :if => (! Puppet.features.pson?) do
before do
diff --git a/spec/integration/network/server/mongrel_spec.rb b/spec/integration/network/server/mongrel_spec.rb
index fd5903b9e..1ce59eb49 100755
--- a/spec/integration/network/server/mongrel_spec.rb
+++ b/spec/integration/network/server/mongrel_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
require 'puppet/network/server'
require 'socket'
-describe Puppet::Network::Server do
+describe Puppet::Network::Server, :'fails_on_ruby_1.9.2' => true do
describe "when using mongrel", :if => Puppet.features.mongrel? do
before :each do
diff --git a/spec/integration/node_spec.rb b/spec/integration/node_spec.rb
index e15ddfc1e..4ea6142e2 100755
--- a/spec/integration/node_spec.rb
+++ b/spec/integration/node_spec.rb
@@ -43,7 +43,7 @@ describe Puppet::Node do
Puppet::Node.indirection.terminus(:ldap).should_not be_nil
end
- it "should be able to use the plain terminus" do
+ it "should be able to use the plain terminus", :'fails_on_ruby_1.9.2' => true do
Puppet::Node.indirection.stubs(:terminus_class).returns :plain
# Load now, before we stub the exists? method.
diff --git a/spec/integration/provider/package_spec.rb b/spec/integration/provider/package_spec.rb
index 2d75826e8..5fecdf13c 100755
--- a/spec/integration/provider/package_spec.rb
+++ b/spec/integration/provider/package_spec.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env rspec
require 'spec_helper'
-describe "Package Provider" do
+describe "Package Provider", :'fails_on_ruby_1.9.2' => true do
Puppet::Type.type(:package).providers.each do |name|
provider = Puppet::Type.type(:package).provider(name)
diff --git a/spec/integration/provider/service/init_spec.rb b/spec/integration/provider/service/init_spec.rb
index ef7d98b4c..c209475bf 100755
--- a/spec/integration/provider/service/init_spec.rb
+++ b/spec/integration/provider/service/init_spec.rb
@@ -3,14 +3,14 @@ require 'spec_helper'
provider = Puppet::Type.type(:service).provider(:init)
-describe provider do
+describe provider, :'fails_on_ruby_1.9.2' => true do
describe "when running on FreeBSD", :if => (Facter.value(:operatingsystem) == "FreeBSD") do
it "should set its default path to include /etc/init.d and /usr/local/etc/init.d" do
provider.defpath.should == ["/etc/rc.d", "/usr/local/etc/rc.d"]
end
end
- describe "when running on HP-UX", :if => (Facter.value(:operatingsystem) == "HP-UX")do
+ describe "when running on HP-UX", :if => (Facter.value(:operatingsystem) == "HP-UX") do
it "should set its default path to include /sbin/init.d" do
provider.defpath.should == "/sbin/init.d"
end
diff --git a/spec/integration/transaction_spec.rb b/spec/integration/transaction_spec.rb
index 0ff50f47c..00e9dbb8e 100755
--- a/spec/integration/transaction_spec.rb
+++ b/spec/integration/transaction_spec.rb
@@ -220,7 +220,7 @@ describe Puppet::Transaction do
FileTest.should be_exists(newfile)
end
- it "should still trigger skipped resources" do
+ it "should still trigger skipped resources", :'fails_on_ruby_1.9.2' => true do
catalog = mk_catalog
catalog.add_resource(*Puppet::Type.type(:schedule).mkdefaultschedules)
diff --git a/spec/integration/util/file_locking_spec.rb b/spec/integration/util/file_locking_spec.rb
index 9e829df0e..3b6964e8b 100755
--- a/spec/integration/util/file_locking_spec.rb
+++ b/spec/integration/util/file_locking_spec.rb
@@ -13,7 +13,7 @@ describe Puppet::Util::FileLocking do
File.open(@file, "w") { |f| f.puts YAML.dump(@data) }
end
- it "should be able to keep file corruption from happening when there are multiple writers threads" do
+ it "should be able to keep file corruption from happening when there are multiple writers threads", :'fails_in_ruby_1.9.2' => true do
threads = []
sync = Sync.new
9.times { |a|
diff --git a/spec/integration/util/rdoc/parser_spec.rb b/spec/integration/util/rdoc/parser_spec.rb
index ce316309b..bf1f0d268 100755
--- a/spec/integration/util/rdoc/parser_spec.rb
+++ b/spec/integration/util/rdoc/parser_spec.rb
@@ -8,7 +8,7 @@ require 'puppet/util/rdoc/code_objects'
require 'rdoc/options'
require 'rdoc/rdoc'
-describe RDoc::Parser do
+describe RDoc::Parser, :'fails_on_ruby_1.9.2' => true do
require 'puppet_spec/files'
include PuppetSpec::Files
diff --git a/spec/lib/puppet/face/huzzah.rb b/spec/lib/puppet/face/huzzah.rb
index 6593d358a..ab465d9e0 100755
--- a/spec/lib/puppet/face/huzzah.rb
+++ b/spec/lib/puppet/face/huzzah.rb
@@ -3,5 +3,5 @@ Puppet::Face.define(:huzzah, '2.0.1') do
copyright "Puppet Labs", 2011
license "Apache 2 license; see COPYING"
summary "life is a thing for celebration"
- script :bar do "is where beer comes from" end
+ script :bar do |options| "is where beer comes from" end
end
diff --git a/spec/lib/puppet/face/version_matching.rb b/spec/lib/puppet/face/version_matching.rb
index 52bc71dbd..bfdf5e36e 100644
--- a/spec/lib/puppet/face/version_matching.rb
+++ b/spec/lib/puppet/face/version_matching.rb
@@ -7,6 +7,6 @@ require 'puppet/face'
copyright "Puppet Labs", 2011
license "Apache 2 license; see COPYING"
summary "version matching face #{version}"
- script :version do version end
+ script :version do |options| version end
end
end
diff --git a/spec/unit/application/cert_spec.rb b/spec/unit/application/cert_spec.rb
index 1b1c61ab4..7510f0783 100755
--- a/spec/unit/application/cert_spec.rb
+++ b/spec/unit/application/cert_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
require 'puppet/application/cert'
-describe Puppet::Application::Cert do
+describe Puppet::Application::Cert, :'fails_on_ruby_1.9.2' => true do
before :each do
@cert_app = Puppet::Application[:cert]
Puppet::Util::Log.stubs(:newdestination)
diff --git a/spec/unit/application/face_base_spec.rb b/spec/unit/application/face_base_spec.rb
index 2a9a22356..3318e061e 100755
--- a/spec/unit/application/face_base_spec.rb
+++ b/spec/unit/application/face_base_spec.rb
@@ -148,7 +148,7 @@ describe Puppet::Application::FaceBase do
end
end
- it "should handle application-level options" do
+ it "should handle application-level options", :'fails_on_ruby_1.9.2' => true do
app.command_line.stubs(:args).returns %w{basetest --verbose return_true}
app.preinit
app.parse_options
diff --git a/spec/unit/application/facts_spec.rb b/spec/unit/application/facts_spec.rb
index 2981dc805..e11ea165c 100755
--- a/spec/unit/application/facts_spec.rb
+++ b/spec/unit/application/facts_spec.rb
@@ -15,7 +15,7 @@ describe Puppet::Application::Facts do
@logs.first.to_s.should =~ /puppet facts find takes 1 argument, but you gave 0/
end
- it "should return facts if a key is given to find" do
+ it "should return facts if a key is given to find", :'fails_on_ruby_1.9.2' => true do
subject.command_line.stubs(:args).returns %w{find whatever --render-as yaml}
expect {
diff --git a/spec/unit/application/resource_spec.rb b/spec/unit/application/resource_spec.rb
index 9ee6dd71b..a6564cae5 100755
--- a/spec/unit/application/resource_spec.rb
+++ b/spec/unit/application/resource_spec.rb
@@ -35,13 +35,13 @@ describe Puppet::Application::Resource do
end
describe "in preinit" do
- it "should set hosts to nil" do
+ it "should set hosts to nil", :'fails_on_ruby_1.9.2' => true do
@resource.preinit
@resource.host.should be_nil
end
- it "should init extra_params to empty array" do
+ it "should init extra_params to empty array", :'fails_on_ruby_1.9.2' => true do
@resource.preinit
@resource.extra_params.should == []
diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb
index fc1bbceb6..aed80e3e6 100755
--- a/spec/unit/application_spec.rb
+++ b/spec/unit/application_spec.rb
@@ -26,7 +26,7 @@ describe Puppet::Application do
@klass.find("Agent").should == @klass::Agent
end
- it "should not find classes outside the namespace" do
+ it "should not find classes outside the namespace", :'fails_on_ruby_1.9.2' => true do
expect { @klass.find("String") }.to exit_with 1
end
@@ -222,7 +222,7 @@ describe Puppet::Application do
end
describe 'on POSIX systems', :if => Puppet.features.posix? do
- it 'should signal process with HUP after block if restart requested during block execution' do
+ it 'should signal process with HUP after block if restart requested during block execution', :'fails_on_ruby_1.9.2' => true do
Puppet::Application.run_status = nil
target = mock 'target'
target.expects(:some_method).once
diff --git a/spec/unit/indirector/facts/couch_spec.rb b/spec/unit/indirector/facts/couch_spec.rb
index d0862486c..b6477bafe 100755
--- a/spec/unit/indirector/facts/couch_spec.rb
+++ b/spec/unit/indirector/facts/couch_spec.rb
@@ -6,12 +6,12 @@ require 'puppet/indirector/facts/couch'
describe "Puppet::Node::Facts::Couch" do
describe "when couchdb is not available", :unless => Puppet.features.couchdb? do
- it "should fail to initialize" do
+ it "should fail to initialize", :'fails_in_ruby_1.9.2' => true do
lambda { Puppet::Node::Facts::Couch.new }.should raise_error
end
end
- describe "when couchdb is available", :if => Puppet.features.couchdb? do
+ describe "when couchdb is available", :if => Puppet.features.couchdb?, :'fails_on_ruby_1.9.2' => true do
before do
@mock_db = mock('couch db')
mock_document = CouchRest::Document.new(:_id => fake_request.key, :facts => fake_request.values)
diff --git a/spec/unit/indirector/ldap_spec.rb b/spec/unit/indirector/ldap_spec.rb
index 2b40325de..d4c9ddcff 100755
--- a/spec/unit/indirector/ldap_spec.rb
+++ b/spec/unit/indirector/ldap_spec.rb
@@ -108,7 +108,7 @@ describe Puppet::Indirector::Ldap do
end
end
- describe "when connecting to ldap", :if => Puppet.features.ldap? do
+ describe "when connecting to ldap", :if => Puppet.features.ldap?, :'fails_on_ruby_1.9.2' => true do
it "should create and start a Util::Ldap::Connection instance" do
conn = mock 'connection', :connection => "myconn", :start => nil
Puppet::Util::Ldap::Connection.expects(:instance).returns conn
diff --git a/spec/unit/indirector/report/yaml_spec.rb b/spec/unit/indirector/report/yaml_spec.rb
index 7df4bb2e9..557795f21 100755
--- a/spec/unit/indirector/report/yaml_spec.rb
+++ b/spec/unit/indirector/report/yaml_spec.rb
@@ -22,7 +22,7 @@ describe Puppet::Transaction::Report::Yaml do
Puppet::Transaction::Report::Yaml.name.should == :yaml
end
- it "should inconditionnally save/load from the --lastrunreport setting" do
+ it "should inconditionnally save/load from the --lastrunreport setting", :'fails_on_ruby_1.9.2' => true do
indirection = stub 'indirection', :name => :my_yaml, :register_terminus_type => nil
Puppet::Indirector::Indirection.stubs(:instance).with(:my_yaml).returns(indirection)
store_class = Class.new(Puppet::Transaction::Report::Yaml) do
diff --git a/spec/unit/indirector/resource/ral_spec.rb b/spec/unit/indirector/resource/ral_spec.rb
index 61290f7a7..cf746cb0c 100755
--- a/spec/unit/indirector/resource/ral_spec.rb
+++ b/spec/unit/indirector/resource/ral_spec.rb
@@ -18,7 +18,7 @@ describe "Puppet::Resource::Ral" do
Puppet::Resource::Ral.new.find(@request).should == my_resource
end
- it "if there is no instance, it should create one" do
+ it "if there is no instance, it should create one", :'fails_on_ruby_1.9.2' => true do
wrong_instance = stub "wrong user", :name => "bob"
require 'puppet/type/user'
diff --git a/spec/unit/indirector/terminus_spec.rb b/spec/unit/indirector/terminus_spec.rb
index 41770e1e3..33932cfca 100755
--- a/spec/unit/indirector/terminus_spec.rb
+++ b/spec/unit/indirector/terminus_spec.rb
@@ -4,7 +4,7 @@ require 'puppet/defaults'
require 'puppet/indirector'
require 'puppet/indirector/file'
-describe Puppet::Indirector::Terminus do
+describe Puppet::Indirector::Terminus, :'fails_on_ruby_1.9.2' => true do
before :each do
Puppet::Indirector::Terminus.stubs(:register_terminus_class)
@indirection = stub 'indirection', :name => :my_stuff, :register_terminus_type => nil
@@ -135,7 +135,7 @@ describe Puppet::Indirector::Terminus, " when managing terminus classes" do
Puppet::Indirector::Terminus.terminus_class(:test1, :yay)
end
- it "should fail when no indirection can be found" do
+ it "should fail when no indirection can be found", :'fails_on_ruby_1.9.2' => true do
Puppet::Indirector::Indirection.expects(:instance).with(:my_indirection).returns(nil)
@abstract_terminus = Class.new(Puppet::Indirector::Terminus) do
@@ -152,7 +152,7 @@ describe Puppet::Indirector::Terminus, " when managing terminus classes" do
}.should raise_error(ArgumentError)
end
- it "should register the terminus class with the terminus base class" do
+ it "should register the terminus class with the terminus base class", :'fails_on_ruby_1.9.2' => true do
Puppet::Indirector::Terminus.expects(:register_terminus_class).with do |type|
type.indirection_name == :my_indirection and type.name == :test_terminus
end
@@ -219,7 +219,7 @@ describe Puppet::Indirector::Terminus, " when parsing class constants for indire
end
end
-describe Puppet::Indirector::Terminus, " when creating terminus class types" do
+describe Puppet::Indirector::Terminus, " when creating terminus class types", :'fails_on_ruby_1.9.2' => true do
before do
Puppet::Indirector::Terminus.stubs(:register_terminus_class)
@subclass = Class.new(Puppet::Indirector::Terminus) do
diff --git a/spec/unit/interface/action_builder_spec.rb b/spec/unit/interface/action_builder_spec.rb
index c39860591..602daaaca 100755
--- a/spec/unit/interface/action_builder_spec.rb
+++ b/spec/unit/interface/action_builder_spec.rb
@@ -8,7 +8,7 @@ describe Puppet::Interface::ActionBuilder do
it "should build an action" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
end
action.should be_a(Puppet::Interface::Action)
action.name.should == :foo
@@ -16,7 +16,7 @@ describe Puppet::Interface::ActionBuilder do
it "should define a method on the face which invokes the action" do
face = Puppet::Interface.new(:action_builder_test_interface, '0.0.1') do
- action(:foo) { when_invoked { "invoked the method" } }
+ action(:foo) { when_invoked { |options| "invoked the method" } }
end
face.foo.should == "invoked the method"
@@ -37,7 +37,7 @@ describe Puppet::Interface::ActionBuilder do
it "should have a #option DSL function" do
method = nil
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
method = self.method(:option)
end
method.should be_an_instance_of Method
@@ -45,7 +45,7 @@ describe Puppet::Interface::ActionBuilder do
it "should define an option without a block" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
option "--bar"
end
action.should be_option :bar
@@ -53,7 +53,7 @@ describe Puppet::Interface::ActionBuilder do
it "should accept an empty block" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
option "--bar" do
# This space left deliberately blank.
end
@@ -65,7 +65,7 @@ describe Puppet::Interface::ActionBuilder do
context "inline documentation" do
it "should set the summary" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
summary "this is some text"
end
action.summary.should == "this is some text"
@@ -75,7 +75,7 @@ describe Puppet::Interface::ActionBuilder do
context "action defaulting" do
it "should set the default to true" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
default
end
action.default.should be_true
@@ -83,7 +83,7 @@ describe Puppet::Interface::ActionBuilder do
it "should not be default by, er, default. *cough*" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
end
action.default.should be_false
end
@@ -93,7 +93,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if no rendering format is given" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering do true end
end
}.to raise_error ArgumentError, /must give a rendering format to when_rendering/
@@ -102,7 +102,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if no block is given" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json
end
}.to raise_error ArgumentError, /must give a block to when_rendering/
@@ -111,7 +111,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if the block takes no arguments" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json do true end
end
}.to raise_error ArgumentError, /when_rendering methods take one argument, the result, not/
@@ -120,7 +120,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if the block takes more than one argument" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json do |a, b, c| true end
end
}.to raise_error ArgumentError, /when_rendering methods take one argument, the result, not/
@@ -129,7 +129,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if the block takes a variable number of arguments" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json do |*args| true end
end
}.to raise_error(ArgumentError,
@@ -138,7 +138,7 @@ describe Puppet::Interface::ActionBuilder do
it "should stash a rendering block" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json do |a| true end
end
action.when_rendering(:json).should be_an_instance_of Method
@@ -147,7 +147,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if you try to set the same rendering twice" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json do |a| true end
when_rendering :json do |a| true end
end
@@ -156,7 +156,7 @@ describe Puppet::Interface::ActionBuilder do
it "should work if you set two different renderings" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json do |a| true end
when_rendering :yaml do |a| true end
end
@@ -166,7 +166,7 @@ describe Puppet::Interface::ActionBuilder do
it "should be bound to the face when called" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
when_rendering :json do |a| self end
end
action.when_rendering(:json).call(true).should == face
@@ -176,7 +176,7 @@ describe Puppet::Interface::ActionBuilder do
context "#render_as" do
it "should default to nil (eg: based on context)" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
end
action.render_as.should be_nil
end
@@ -184,7 +184,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if not rendering format is given" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
render_as
end
}.to raise_error ArgumentError, /must give a rendering format to render_as/
@@ -193,7 +193,7 @@ describe Puppet::Interface::ActionBuilder do
Puppet::Network::FormatHandler.formats.each do |name|
it "should accept #{name.inspect} format" do
action = Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
render_as name
end
action.render_as.should == name
@@ -204,7 +204,7 @@ describe Puppet::Interface::ActionBuilder do
it "should fail if given #{input.inspect}" do
expect {
Puppet::Interface::ActionBuilder.build(face, :foo) do
- when_invoked do true end
+ when_invoked do |options| true end
render_as input
end
}.to raise_error ArgumentError, /#{input.inspect} is not a valid rendering format/
diff --git a/spec/unit/interface/action_manager_spec.rb b/spec/unit/interface/action_manager_spec.rb
index 5a479ad5c..e357a5fa1 100755
--- a/spec/unit/interface/action_manager_spec.rb
+++ b/spec/unit/interface/action_manager_spec.rb
@@ -15,57 +15,57 @@ describe Puppet::Interface::ActionManager do
describe "when included in a class" do
it "should be able to define an action" do
subject.action(:foo) do
- when_invoked { "something "}
+ when_invoked { |options| "something "}
end
end
it "should be able to define a 'script' style action" do
- subject.script :bar do
+ subject.script :bar do |options|
"a bar is where beer is found"
end
end
it "should be able to list defined actions" do
subject.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
subject.action(:bar) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
subject.actions.should =~ [:foo, :bar]
end
it "should list 'script' actions" do
- subject.script :foo do "foo" end
+ subject.script :foo do |options| "foo" end
subject.actions.should =~ [:foo]
end
it "should list both script and normal actions" do
subject.action :foo do
- when_invoked do "foo" end
+ when_invoked do |options| "foo" end
end
- subject.script :bar do "a bar is where beer is found" end
+ subject.script :bar do |options| "a bar is where beer is found" end
subject.actions.should =~ [:foo, :bar]
end
it "should be able to indicate when an action is defined" do
subject.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
subject.should be_action(:foo)
end
it "should indicate an action is defined for script actions" do
- subject.script :foo do "foo" end
+ subject.script :foo do |options| "foo" end
subject.should be_action :foo
end
it "should correctly treat action names specified as strings" do
subject.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
subject.should be_action("foo")
@@ -77,16 +77,16 @@ describe Puppet::Interface::ActionManager do
it "should be able to define an action" do
subject.action(:foo) do
- when_invoked { "something "}
+ when_invoked { |options| "something "}
end
end
it "should be able to list defined actions" do
subject.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
subject.action(:bar) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
subject.actions.should include(:bar)
@@ -94,7 +94,7 @@ describe Puppet::Interface::ActionManager do
end
it "should be able to indicate when an action is defined" do
- subject.action(:foo) { when_invoked do true end }
+ subject.action(:foo) { when_invoked do |options| true end }
subject.should be_action(:foo)
end
end
@@ -112,36 +112,36 @@ describe Puppet::Interface::ActionManager do
it "should be able to define an action at the class level" do
@klass.action(:foo) do
- when_invoked { "something "}
+ when_invoked { |options| "something "}
end
end
it "should create an instance method when an action is defined at the class level" do
@klass.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.foo.should == "something"
end
it "should be able to define an action at the instance level" do
@instance.action(:foo) do
- when_invoked { "something "}
+ when_invoked { |options| "something "}
end
end
it "should create an instance method when an action is defined at the instance level" do
@instance.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.foo.should == "something"
end
it "should be able to list actions defined at the class level" do
@klass.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@klass.action(:bar) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@klass.actions.should include(:bar)
@@ -150,10 +150,10 @@ describe Puppet::Interface::ActionManager do
it "should be able to list actions defined at the instance level" do
@instance.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.action(:bar) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.actions.should include(:bar)
@@ -162,10 +162,10 @@ describe Puppet::Interface::ActionManager do
it "should be able to list actions defined at both instance and class level" do
@klass.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.action(:bar) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.actions.should include(:bar)
@@ -174,14 +174,14 @@ describe Puppet::Interface::ActionManager do
it "should be able to indicate when an action is defined at the class level" do
@klass.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.should be_action(:foo)
end
it "should be able to indicate when an action is defined at the instance level" do
@klass.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.should be_action(:foo)
end
@@ -191,13 +191,13 @@ describe Puppet::Interface::ActionManager do
@instance = @subclass.new
@klass.action(:parent) do
- when_invoked { "a" }
+ when_invoked { |options| "a" }
end
@subclass.action(:sub) do
- when_invoked { "a" }
+ when_invoked { |options| "a" }
end
@instance.action(:instance) do
- when_invoked { "a" }
+ when_invoked { |options| "a" }
end
@instance.should be_action(:parent)
@@ -210,7 +210,7 @@ describe Puppet::Interface::ActionManager do
@instance = @subclass.new
@klass.action(:foo) do
- when_invoked { "something" }
+ when_invoked { |options| "something" }
end
@instance.foo.should == "something"
end
@@ -218,19 +218,19 @@ describe Puppet::Interface::ActionManager do
describe "#action" do
it 'should add an action' do
- subject.action(:foo) { when_invoked do true end }
+ subject.action(:foo) { when_invoked do |options| true end }
subject.get_action(:foo).should be_a Puppet::Interface::Action
end
it 'should support default actions' do
- subject.action(:foo) { when_invoked do true end; default }
+ subject.action(:foo) { when_invoked do |options| true end; default }
subject.get_default_action.should == subject.get_action(:foo)
end
it 'should not support more than one default action' do
- subject.action(:foo) { when_invoked do true end; default }
+ subject.action(:foo) { when_invoked do |options| true end; default }
expect { subject.action(:bar) {
- when_invoked do true end
+ when_invoked do |options| true end
default
}
}.should raise_error /cannot both be default/
@@ -240,7 +240,7 @@ describe Puppet::Interface::ActionManager do
describe "#get_action" do
let :parent_class do
parent_class = Class.new(Puppet::Interface)
- parent_class.action(:foo) { when_invoked do true end }
+ parent_class.action(:foo) { when_invoked do |options| true end }
parent_class
end
diff --git a/spec/unit/interface/action_spec.rb b/spec/unit/interface/action_spec.rb
index 9e539c68e..cf8d61d51 100755
--- a/spec/unit/interface/action_spec.rb
+++ b/spec/unit/interface/action_spec.rb
@@ -20,11 +20,10 @@ describe Puppet::Interface::Action do
expect {
Puppet::Interface.new(:action_when_invoked, '1.0.0') do
action :foo do
- when_invoked do
- end
+ when_invoked { }
end
end
- }.to raise_error ArgumentError, /foobra/
+ }.to raise_error ArgumentError, /foo/
end
it "should work with arity 1 blocks" do
@@ -72,11 +71,11 @@ describe Puppet::Interface::Action do
it "should be able to call other actions on the same object" do
face = Puppet::Interface.new(:my_face, '0.0.1') do
action(:foo) do
- when_invoked { 25 }
+ when_invoked { |options| 25 }
end
action(:bar) do
- when_invoked { "the value of foo is '#{foo}'" }
+ when_invoked { |options| "the value of foo is '#{foo}'" }
end
end
face.foo.should == 25
@@ -90,25 +89,25 @@ describe Puppet::Interface::Action do
it "should be able to call other actions on the same object when defined on a class" do
class Puppet::Interface::MyInterfaceBaseClass < Puppet::Interface
action(:foo) do
- when_invoked { 25 }
+ when_invoked { |options| 25 }
end
action(:bar) do
- when_invoked { "the value of foo is '#{foo}'" }
+ when_invoked { |options| "the value of foo is '#{foo}'" }
end
action(:quux) do
- when_invoked { "qux told me #{qux}" }
+ when_invoked { |options| "qux told me #{qux}" }
end
end
face = Puppet::Interface::MyInterfaceBaseClass.new(:my_inherited_face, '0.0.1') do
action(:baz) do
- when_invoked { "the value of foo in baz is '#{foo}'" }
+ when_invoked { |options| "the value of foo in baz is '#{foo}'" }
end
action(:qux) do
- when_invoked { baz }
+ when_invoked { |options| baz }
end
end
face.foo.should == 25
@@ -150,7 +149,7 @@ describe Puppet::Interface::Action do
it "should support options with an empty block" do
face = Puppet::Interface.new(:action_level_options, '0.0.1') do
action :foo do
- when_invoked do true end
+ when_invoked do |options| true end
option "--bar" do
# this line left deliberately blank
end
@@ -164,7 +163,7 @@ describe Puppet::Interface::Action do
it "should return only action level options when there are no face options" do
face = Puppet::Interface.new(:action_level_options, '0.0.1') do
action :foo do
- when_invoked do true end
+ when_invoked do |options| true end
option "--bar"
end
end
@@ -175,8 +174,8 @@ describe Puppet::Interface::Action do
describe "with both face and action options" do
let :face do
Puppet::Interface.new(:action_level_options, '0.0.1') do
- action :foo do when_invoked do true end ; option "--bar" end
- action :baz do when_invoked do true end ; option "--bim" end
+ action :foo do when_invoked do |options| true end ; option "--bar" end
+ action :baz do when_invoked do |options| true end ; option "--bim" end
option "--quux"
end
end
@@ -191,7 +190,7 @@ describe Puppet::Interface::Action do
child = parent.new(:inherited_options, '0.0.1') do
option "--bar"
action :action do
- when_invoked do true end
+ when_invoked do |options| true end
option "--baz"
end
end
@@ -223,7 +222,7 @@ describe Puppet::Interface::Action do
def add_options_to(&block)
face = Puppet::Interface.new(:with_options, '0.0.1') do
action(:foo) do
- when_invoked do true end
+ when_invoked do |options| true end
self.instance_eval &block
end
end
@@ -244,7 +243,7 @@ describe Puppet::Interface::Action do
face = Puppet::Interface.new(:required_action_option, '0.0.1') do
action(:bar) do
option('--foo') { required }
- when_invoked { }
+ when_invoked {|options| }
end
end
expect { face.bar }.to raise_error ArgumentError, /The following options are required: foo/
@@ -253,7 +252,7 @@ describe Puppet::Interface::Action do
it "should fail when a required face option is not provided" do
face = Puppet::Interface.new(:required_face_option, '0.0.1') do
option('--foo') { required }
- action(:bar) { when_invoked { } }
+ action(:bar) { when_invoked {|options| } }
end
expect { face.bar }.to raise_error ArgumentError, /The following options are required: foo/
end
@@ -263,7 +262,7 @@ describe Puppet::Interface::Action do
context "declared locally" do
let :face do
Puppet::Interface.new(:action_decorators, '0.0.1') do
- action :bar do when_invoked do true end end
+ action :bar do when_invoked do |options| true end end
def reported; @reported; end
def report(arg)
(@reported ||= []) << arg
@@ -278,7 +277,7 @@ describe Puppet::Interface::Action do
option("-q", "--quux") { before_action { |_,_,_| report :quux } }
option("-f") { before_action { |_,_,_| report :f } }
option("--baz") { before_action { |_,_,_| report :baz } }
- when_invoked { }
+ when_invoked {|options| }
end
face.boo :foo => 1, :bar => 1, :quux => 1, :f => 1, :baz => 1
@@ -292,7 +291,7 @@ describe Puppet::Interface::Action do
option("-q", "--quux") { after_action { |_,_,_| report :quux } }
option("-f") { after_action { |_,_,_| report :f } }
option("--baz") { after_action { |_,_,_| report :baz } }
- when_invoked { }
+ when_invoked {|options| }
end
face.boo :foo => 1, :bar => 1, :quux => 1, :f => 1, :baz => 1
@@ -307,7 +306,7 @@ describe Puppet::Interface::Action do
option("-f") { before_action { |_,_,_| report :f } }
option("--baz") { before_action { |_,_,_| report :baz } }
end
- face.script(:boo) { }
+ face.script(:boo) {|options| }
face.boo :foo => 1, :bar => 1, :quux => 1, :f => 1, :baz => 1
face.reported.should == [ :foo, :bar, :quux, :f, :baz ]
@@ -321,7 +320,7 @@ describe Puppet::Interface::Action do
option("-f") { after_action { |_,_,_| report :f } }
option("--baz") { after_action { |_,_,_| report :baz } }
end
- face.script(:boo) { }
+ face.script(:boo) {|options| }
face.boo :foo => 1, :bar => 1, :quux => 1, :f => 1, :baz => 1
face.reported.should == [ :foo, :bar, :quux, :f, :baz ].reverse
@@ -337,7 +336,7 @@ describe Puppet::Interface::Action do
option("-q", "--action-quux") { before_action { |_,_,_| report :action_quux } }
option("-a") { before_action { |_,_,_| report :a } }
option("--action-baz") { before_action { |_,_,_| report :action_baz } }
- when_invoked { }
+ when_invoked {|options| }
end
option("-u", "--face-quux") { before_action { |_,_,_| report :face_quux } }
option("-f") { before_action { |_,_,_| report :f } }
@@ -360,7 +359,7 @@ describe Puppet::Interface::Action do
option("-q", "--action-quux") { after_action { |_,_,_| report :action_quux } }
option("-a") { after_action { |_,_,_| report :a } }
option("--action-baz") { after_action { |_,_,_| report :action_baz } }
- when_invoked { }
+ when_invoked {|options| }
end
option("-u", "--face-quux") { after_action { |_,_,_| report :face_quux } }
option("-f") { after_action { |_,_,_| report :f } }
@@ -405,7 +404,7 @@ describe Puppet::Interface::Action do
context "and inheritance" do
let :parent do
Class.new(Puppet::Interface) do
- script(:on_parent) { :on_parent }
+ script(:on_parent) {|options| :on_parent }
def reported; @reported; end
def report(arg)
@@ -416,7 +415,7 @@ describe Puppet::Interface::Action do
let :child do
parent.new(:inherited_decorators, '0.0.1') do
- script(:on_child) { :on_child }
+ script(:on_child) {|options| :on_child }
end
end
@@ -479,7 +478,7 @@ describe Puppet::Interface::Action do
after_action { |action, args, options| report :b_after }
end
- child.script(:decorations) { report :invoked }
+ child.script(:decorations) { |options| report :invoked }
child
end
@@ -509,7 +508,7 @@ describe Puppet::Interface::Action do
subject do
face = Puppet::Interface.new(:action_documentation, '0.0.1') do
action :documentation do
- when_invoked do true end
+ when_invoked do |options| true end
end
end
face.get_action(:documentation)
@@ -528,7 +527,7 @@ describe Puppet::Interface::Action do
context "#validate_args" do
subject do
Puppet::Interface.new(:validate_args, '1.0.0') do
- script :test do true end
+ script :test do |options| true end
end
end
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index e28e55aac..8bbbcc857 100755
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -101,7 +101,7 @@ describe Puppet::Interface do
should raise_error ArgumentError
end
- it "should instance-eval any provided block" do
+ it "should instance-eval any provided block", :'fails_on_ruby_1.9.2' => true do
face = subject.new(:face_test_block, '0.0.1') do
action(:something) do
when_invoked { "foo" }
@@ -140,7 +140,7 @@ describe Puppet::Interface do
end
end
- describe "with face-level options" do
+ describe "with face-level options", :'fails_on_ruby_1.9.2' => true do
it "should not return any action-level options" do
face = subject.new(:with_options, '0.0.1') do
option "--foo"
@@ -191,7 +191,7 @@ describe Puppet::Interface do
face
end
- describe "#options" do
+ describe "#options", :'fails_on_ruby_1.9.2' => true do
it "should list inherited options" do
face.options.should =~ [:inherited, :local]
end
@@ -213,7 +213,7 @@ describe Puppet::Interface do
end
end
- describe "#get_option" do
+ describe "#get_option", :'fails_on_ruby_1.9.2' => true do
it "should return an inherited option object" do
face.get_option(:inherited).should be_an_instance_of subject::Option
end
diff --git a/spec/unit/network/handler/fileserver_spec.rb b/spec/unit/network/handler/fileserver_spec.rb
index 52c4a71f5..08852634d 100755
--- a/spec/unit/network/handler/fileserver_spec.rb
+++ b/spec/unit/network/handler/fileserver_spec.rb
@@ -123,7 +123,7 @@ describe Puppet::Network::Handler::FileServer do
list.sort.should == [ ["/aFile", "file"], ["/", "directory"] ].sort
end
- describe Puppet::Network::Handler::FileServer::PluginMount do
+ describe Puppet::Network::Handler::FileServer::PluginMount, :'fails_on_ruby_1.9.2' => true do
PLUGINS = Puppet::Network::Handler::FileServer::PLUGINS
# create a module plugin hierarchy
diff --git a/spec/unit/network/http/mongrel/rest_spec.rb b/spec/unit/network/http/mongrel/rest_spec.rb
index 3e454cf8f..85b9f7496 100755
--- a/spec/unit/network/http/mongrel/rest_spec.rb
+++ b/spec/unit/network/http/mongrel/rest_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
require 'puppet/network/http'
-describe "Puppet::Network::HTTP::MongrelREST", :if => Puppet.features.mongrel? do
+describe "Puppet::Network::HTTP::MongrelREST", :if => Puppet.features.mongrel?, :'fails_on_ruby_1.9.2' => true do
before do
require 'puppet/network/http/mongrel/rest'
end
diff --git a/spec/unit/network/http/mongrel_spec.rb b/spec/unit/network/http/mongrel_spec.rb
index 56d0afbed..6776fad61 100755
--- a/spec/unit/network/http/mongrel_spec.rb
+++ b/spec/unit/network/http/mongrel_spec.rb
@@ -6,15 +6,15 @@
require 'spec_helper'
require 'puppet/network/http'
-describe "Puppet::Network::HTTP::Mongrel", "after initializing", :if => Puppet.features.mongrel? do
- it "should not be listening" do
+describe "Puppet::Network::HTTP::Mongrel", "after initializing", :if => Puppet.features.mongrel?, :'fails_on_ruby_1.9.2' => true do
+ it "should not be listening", :'fails_on_ruby_1.9.2' => true do
require 'puppet/network/http/mongrel'
Puppet::Network::HTTP::Mongrel.new.should_not be_listening
end
end
-describe "Puppet::Network::HTTP::Mongrel", "when turning on listening", :if => Puppet.features.mongrel? do
+describe "Puppet::Network::HTTP::Mongrel", "when turning on listening", :if => Puppet.features.mongrel?, :'fails_on_ruby_1.9.2' => true do
before do
require 'puppet/network/http/mongrel'
@@ -96,7 +96,7 @@ describe "Puppet::Network::HTTP::Mongrel", "when turning on listening", :if => P
end
end
-describe "Puppet::Network::HTTP::Mongrel", "when turning off listening", :if => Puppet.features.mongrel? do
+describe "Puppet::Network::HTTP::Mongrel", "when turning off listening", :if => Puppet.features.mongrel?, :'fails_on_ruby_1.9.2' => true do
before do
@mock_mongrel = mock('mongrel httpserver')
@mock_mongrel.stubs(:run)
diff --git a/spec/unit/network/http/webrick/rest_spec.rb b/spec/unit/network/http/webrick/rest_spec.rb
index 267ddcc72..84a2b7791 100755
--- a/spec/unit/network/http/webrick/rest_spec.rb
+++ b/spec/unit/network/http/webrick/rest_spec.rb
@@ -9,7 +9,7 @@ describe Puppet::Network::HTTP::WEBrickREST do
Puppet::Network::HTTP::WEBrickREST.ancestors.should be_include(Puppet::Network::HTTP::Handler)
end
- describe "when initializing" do
+ describe "when initializing", :'fails_on_ruby_1.9.2' => true do
it "should call the Handler's initialization hook with its provided arguments as the server and handler" do
Puppet::Network::HTTP::WEBrickREST.any_instance.expects(:initialize_for_puppet).with(:server => "my", :handler => "arguments")
Puppet::Network::HTTP::WEBrickREST.new("my", "arguments")
diff --git a/spec/unit/parser/ast/function_spec.rb b/spec/unit/parser/ast/function_spec.rb
index c52e806e9..d683b122b 100755
--- a/spec/unit/parser/ast/function_spec.rb
+++ b/spec/unit/parser/ast/function_spec.rb
@@ -48,7 +48,7 @@ describe Puppet::Parser::AST::Function do
lambda{ func.evaluate(@scope) }.should raise_error(Puppet::ParseError,"Function 'exist' must be the value of a statement")
end
- it "should evaluate its arguments" do
+ it "should evaluate its arguments", :'fails_on_ruby_1.9.2' => true do
argument = stub 'arg'
Puppet::Parser::Functions.stubs(:function).with("exist").returns(true)
func = Puppet::Parser::AST::Function.new :name => "exist", :ftype => :statement, :arguments => argument
diff --git a/spec/unit/parser/ast/selector_spec.rb b/spec/unit/parser/ast/selector_spec.rb
index 1bf5f6757..76afec271 100755
--- a/spec/unit/parser/ast/selector_spec.rb
+++ b/spec/unit/parser/ast/selector_spec.rb
@@ -6,7 +6,7 @@ describe Puppet::Parser::AST::Selector do
@scope = Puppet::Parser::Scope.new
end
- describe "when evaluating" do
+ describe "when evaluating", :'fails_on_ruby_1.9.2' => true do
before :each do
@param = stub 'param'
diff --git a/spec/unit/parser/compiler_spec.rb b/spec/unit/parser/compiler_spec.rb
index 88f7167f3..fcce9f6f4 100755
--- a/spec/unit/parser/compiler_spec.rb
+++ b/spec/unit/parser/compiler_spec.rb
@@ -571,7 +571,7 @@ describe Puppet::Parser::Compiler do
@compiler.evaluate_classes(%w{myclass}, @scope)
end
- it "should ensure each node class hash is in catalog and have appropriate parameters" do
+ it "should ensure each node class hash is in catalog and have appropriate parameters", :'fails_on_ruby_1.9.2' => true do
klasses = {'foo'=>{'1'=>'one'}, 'bar::foo'=>{'2'=>'two'}, 'bar'=>{'1'=> [1,2,3], '2'=>{'foo'=>'bar'}}}
@node.classes = klasses
ast_obj = Puppet::Parser::AST::String.new(:value => 'foo')
@@ -595,7 +595,7 @@ describe Puppet::Parser::Compiler do
r2.tags.should =~ ['class', 'bar']
end
- it "should ensure each node class is in catalog and has appropriate tags" do
+ it "should ensure each node class is in catalog and has appropriate tags", :'fails_on_ruby_1.9.2' => true do
klasses = ['bar::foo']
@node.classes = klasses
ast_obj = Puppet::Parser::AST::String.new(:value => 'foo')
diff --git a/spec/unit/parser/functions/create_resources_spec.rb b/spec/unit/parser/functions/create_resources_spec.rb
index 88a67e369..da76e75d0 100755
--- a/spec/unit/parser/functions/create_resources_spec.rb
+++ b/spec/unit/parser/functions/create_resources_spec.rb
@@ -114,7 +114,7 @@ notify{tester:}
@scope.resource=Puppet::Parser::Resource.new('class', 't', :scope => @scope)
Puppet::Parser::Functions.function(:create_resources)
end
- it 'should be able to create classes' do
+ it 'should be able to create classes', :'fails_on_ruby_1.9.2' => true do
@scope.function_create_resources(['class', {'bar'=>{'one'=>'two'}}])
@scope.compiler.compile
@compiler.catalog.resource(:notify, "test")['message'].should == 'two'
@@ -123,7 +123,7 @@ notify{tester:}
it 'should fail to create non-existing classes' do
lambda { @scope.function_create_resources(['class', {'blah'=>{'one'=>'two'}}]) }.should raise_error(ArgumentError ,'could not find hostclass blah')
end
- it 'should be able to add edges' do
+ it 'should be able to add edges', :'fails_on_ruby_1.9.2' => true do
@scope.function_create_resources(['class', {'bar'=>{'one'=>'two', 'require' => 'Notify[tester]'}}])
@scope.compiler.compile
rg = @scope.compiler.catalog.to_ral.relationship_graph
diff --git a/spec/unit/parser/functions/inline_template_spec.rb b/spec/unit/parser/functions/inline_template_spec.rb
index a9ac0c2d0..47dcae15e 100755
--- a/spec/unit/parser/functions/inline_template_spec.rb
+++ b/spec/unit/parser/functions/inline_template_spec.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env rspec
require 'spec_helper'
-describe "the inline_template function" do
+describe "the inline_template function", :'fails_on_ruby_1.9.2' => true do
before :all do
Puppet::Parser::Functions.autoloader.loadall
end
diff --git a/spec/unit/parser/functions/shellquote_spec.rb b/spec/unit/parser/functions/shellquote_spec.rb
index b100b4913..bfa2969ea 100755
--- a/spec/unit/parser/functions/shellquote_spec.rb
+++ b/spec/unit/parser/functions/shellquote_spec.rb
@@ -53,7 +53,7 @@ describe "the shellquote function" do
result.should(eql( "'$PATH' 'foo$bar' '\"x$\"'"))
end
- it "should deal with apostrophes (single quotes)" do
+ it "should deal with apostrophes (single quotes)", :'fails_on_ruby_1.9.2' => true do
result = @scope.function_shellquote(
["'foo'bar'", "`$'EDITOR'`"])
result.should(eql(
@@ -65,12 +65,12 @@ describe "the shellquote function" do
result.should(eql( "'`echo *`' '`ls \"$MAILPATH\"`'"))
end
- it "should deal with both single and double quotes" do
+ it "should deal with both single and double quotes", :'fails_on_ruby_1.9.2' => true do
result = @scope.function_shellquote( ['\'foo"bar"xyzzy\'', '"foo\'bar\'xyzzy"'])
result.should(eql( '"\'foo\\"bar\\"xyzzy\'" "\\"foo\'bar\'xyzzy\\""'))
end
- it "should handle multiple quotes *and* dollars and backquotes" do
+ it "should handle multiple quotes *and* dollars and backquotes", :'fails_on_ruby_1.9.2' => true do
result = @scope.function_shellquote( ['\'foo"$x`bar`"xyzzy\''])
result.should(eql( '"\'foo\\"\\$x\\`bar\\`\\"xyzzy\'"'))
end
diff --git a/spec/unit/parser/functions/template_spec.rb b/spec/unit/parser/functions/template_spec.rb
index e7ee974d3..6bce69534 100755
--- a/spec/unit/parser/functions/template_spec.rb
+++ b/spec/unit/parser/functions/template_spec.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env rspec
require 'spec_helper'
-describe "the template function" do
+describe "the template function", :'fails_on_ruby_1.9.2' => true do
before :all do
Puppet::Parser::Functions.autoloader.loadall
end
diff --git a/spec/unit/parser/resource_spec.rb b/spec/unit/parser/resource_spec.rb
index 0d9cba60b..365c4e9c5 100755
--- a/spec/unit/parser/resource_spec.rb
+++ b/spec/unit/parser/resource_spec.rb
@@ -113,7 +113,7 @@ describe Puppet::Parser::Resource do
@arguments = {:scope => @scope}
end
- it "should fail unless #{name.to_s} is specified" do
+ it "should fail unless #{name.to_s} is specified", :'fails_on_ruby_1.9.2' => true do
lambda { Puppet::Parser::Resource.new('file', '/my/file') }.should raise_error(ArgumentError)
end
diff --git a/spec/unit/provider/mount/parsed_spec.rb b/spec/unit/provider/mount/parsed_spec.rb
index 2e1e1e92e..7831dae3a 100755
--- a/spec/unit/provider/mount/parsed_spec.rb
+++ b/spec/unit/provider/mount/parsed_spec.rb
@@ -39,7 +39,7 @@ FSTAB
# it_should_behave_like "all parsedfile providers",
# provider_class, my_fixtures('*.fstab')
- describe "on Solaris", :if => Facter.value(:operatingsystem) == 'Solaris' do
+ describe "on Solaris", :if => Facter.value(:operatingsystem) == 'Solaris', :'fails_on_ruby_1.9.2' => true do
before :each do
@example_line = "/dev/dsk/c0d0s0 /dev/rdsk/c0d0s0 \t\t / \t ufs 1 no\t-"
diff --git a/spec/unit/provider/package/macports_spec.rb b/spec/unit/provider/package/macports_spec.rb
index 7d1acd537..8e08242d8 100755
--- a/spec/unit/provider/package/macports_spec.rb
+++ b/spec/unit/provider/package/macports_spec.rb
@@ -30,7 +30,7 @@ describe provider_class do
it { should be_versionable }
end
- describe "when listing all instances" do
+ describe "when listing all instances", :'fails_on_ruby_1.9.2' => true do
it "should call port -q installed" do
provider_class.expects(:port).with("-q", :installed).returns("")
provider_class.instances
@@ -111,7 +111,7 @@ describe provider_class do
provider.update
end
- it "should execute port install if the port is not installed" do
+ it "should execute port install if the port is not installed", :'fails_on_ruby_1.9.2' => true do
resource[:name] = resource_name
resource[:ensure] = :present
provider.expects(:query).returns("")
diff --git a/spec/unit/provider/service/init_spec.rb b/spec/unit/provider/service/init_spec.rb
index d64e0fc5d..8374594e7 100755
--- a/spec/unit/provider/service/init_spec.rb
+++ b/spec/unit/provider/service/init_spec.rb
@@ -46,7 +46,7 @@ describe provider_class do
results = (@services-exclude).collect {|x| "#{x}_instance"}
@class.get_services(@class.defpath, exclude).should == results
end
- it "should omit a single service from the exclude list" do
+ it "should omit a single service from the exclude list", :'fails_on_ruby_1.9.2' => true do
exclude = 'two'
(@services-exclude.to_a).each do |inst|
@class.expects(:new).with{|hash| hash[:name] == inst}.returns("#{inst}_instance")
diff --git a/spec/unit/provider/service/src_spec.rb b/spec/unit/provider/service/src_spec.rb
index 17f49994e..b45ca0c7c 100755
--- a/spec/unit/provider/service/src_spec.rb
+++ b/spec/unit/provider/service/src_spec.rb
@@ -44,7 +44,7 @@ describe provider_class do
@provider.stop
end
- it "should execute status and return running if the subsystem is active" do
+ it "should execute status and return running if the subsystem is active", :'fails_on_ruby_1.9.2' => true do
sample_output = <<_EOF_
Subsystem Group PID Status
myservice tcpip 1234 active
@@ -54,7 +54,7 @@ _EOF_
@provider.status.should == :running
end
- it "should execute status and return stopped if the subsystem is inoperative" do
+ it "should execute status and return stopped if the subsystem is inoperative", :'fails_on_ruby_1.9.2' => true do
sample_output = <<_EOF_
Subsystem Group PID Status
myservice tcpip inoperative
@@ -64,7 +64,7 @@ _EOF_
@provider.status.should == :stopped
end
- it "should execute status and return nil if the status is not known" do
+ it "should execute status and return nil if the status is not known", :'fails_on_ruby_1.9.2' => true do
sample_output = <<_EOF_
Subsystem Group PID Status
myservice tcpip randomdata
@@ -74,7 +74,7 @@ _EOF_
@provider.status.should == nil
end
- it "should execute restart which runs refresh" do
+ it "should execute restart which runs refresh", :'fails_on_ruby_1.9.2' => true do
sample_output = <<_EOF_
#subsysname:synonym:cmdargs:path:uid:auditid:standin:standout:standerr:action:multi:contact:svrkey:svrmtype:priority:signorm:sigforce:display:waittime:grpname:
myservice:::/usr/sbin/inetd:0:0:/dev/console:/dev/console:/dev/console:-O:-Q:-K:0:0:20:0:0:-d:20:tcpip:
@@ -84,7 +84,7 @@ _EOF_
@provider.restart
end
- it "should execute restart which runs stopsrc then startsrc" do
+ it "should execute restart which runs stopsrc then startsrc", :'fails_on_ruby_1.9.2' => true do
sample_output = <<_EOF_
#subsysname:synonym:cmdargs:path:uid:auditid:standin:standout:standerr:action:multi:contact:svrkey:svrmtype:priority:signorm:sigforce:display:waittime:grpname:
myservice::--no-daemonize:/usr/sbin/puppetd:0:0:/dev/null:/var/log/puppet.log:/var/log/puppet.log:-O:-Q:-S:0:0:20:15:9:-d:20::"
diff --git a/spec/unit/provider/user/user_role_add_spec.rb b/spec/unit/provider/user/user_role_add_spec.rb
index b17ba68c8..5f2fc306e 100755
--- a/spec/unit/provider/user/user_role_add_spec.rb
+++ b/spec/unit/provider/user/user_role_add_spec.rb
@@ -40,7 +40,7 @@ describe provider_class do
end
end
- describe "when calling transition" do
+ describe "when calling transition", :'fails_on_ruby_1.9.2' => true do
it "should return the type set to whatever is passed in" do
@provider.expects(:command).with(:modify).returns("foomod")
@provider.transition("bar").include?("type=bar")
@@ -120,7 +120,7 @@ describe provider_class do
@provider.expects(:execute).with { |args| args.include?("-o") }
end
- it "should add -o when the user is being created" do
+ it "should add -o when the user is being created", :'fails_on_ruby_1.9.2' => true do
@provider.stubs(:password=)
@provider.create
end
diff --git a/spec/unit/provider/zpool/solaris_spec.rb b/spec/unit/provider/zpool/solaris_spec.rb
index 7e3048a7a..39ee9c9ba 100755
--- a/spec/unit/provider/zpool/solaris_spec.rb
+++ b/spec/unit/provider/zpool/solaris_spec.rb
@@ -150,7 +150,7 @@ describe provider_class do
end
end
- describe "when calling create" do
+ describe "when calling create", :'fails_on_ruby_1.9.2' => true do
before do
@resource.stubs(:[]).with(:pool).returns("mypool")
@provider.stubs(:zpool)
diff --git a/spec/unit/resource/status_spec.rb b/spec/unit/resource/status_spec.rb
index bb88518c0..e5a9291db 100755
--- a/spec/unit/resource/status_spec.rb
+++ b/spec/unit/resource/status_spec.rb
@@ -140,7 +140,7 @@ describe Puppet::Resource::Status do
end
end
- describe "When converting to YAML" do
+ describe "When converting to YAML", :'fails_on_ruby_1.9.2' => true do
it "should include only documented attributes" do
@status.file = "/foo.rb"
@status.line = 27
diff --git a/spec/unit/resource_spec.rb b/spec/unit/resource_spec.rb
index 79ea69e9c..5c8e8dcf9 100755
--- a/spec/unit/resource_spec.rb
+++ b/spec/unit/resource_spec.rb
@@ -516,7 +516,7 @@ type: File
)
end
- it "should align, sort and add trailing commas to attributes with ensure first" do
+ it "should align, sort and add trailing commas to attributes with ensure first", :'fails_on_ruby_1.9.2' => true do
@resource.to_manifest.should == <<-HEREDOC.gsub(/^\s{8}/, '').gsub(/\n$/, '')
one::two { '/my/file':
ensure => 'present',
diff --git a/spec/unit/simple_graph_spec.rb b/spec/unit/simple_graph_spec.rb
index 472ebbd36..17e382fcc 100755
--- a/spec/unit/simple_graph_spec.rb
+++ b/spec/unit/simple_graph_spec.rb
@@ -441,7 +441,7 @@ describe Puppet::SimpleGraph do
end
end
- describe "when matching edges" do
+ describe "when matching edges", :'fails_on_ruby_1.9.2' => true do
before do
@graph = Puppet::SimpleGraph.new
@event = Puppet::Transaction::Event.new(:name => :yay, :resource => "a")
diff --git a/spec/unit/ssl/certificate_authority/interface_spec.rb b/spec/unit/ssl/certificate_authority/interface_spec.rb
index 9e858dd54..46273ccee 100755
--- a/spec/unit/ssl/certificate_authority/interface_spec.rb
+++ b/spec/unit/ssl/certificate_authority/interface_spec.rb
@@ -68,7 +68,7 @@ describe Puppet::SSL::CertificateAuthority::Interface do
@class.new(:generate, :to => :all).subjects.should == :all
end
- it "should fail if the subjects setting isn't :all or an array" do
+ it "should fail if the subjects setting isn't :all or an array", :'fails_on_ruby_1.9.2' => true do
lambda { @class.new(:generate, "other") }.should raise_error(ArgumentError)
end
end
diff --git a/spec/unit/ssl/host_spec.rb b/spec/unit/ssl/host_spec.rb
index d14da538e..c2d9690e6 100755
--- a/spec/unit/ssl/host_spec.rb
+++ b/spec/unit/ssl/host_spec.rb
@@ -517,7 +517,7 @@ describe Puppet::SSL::Host do
Puppet::SSL::Host.search :for => Puppet::SSL::CertificateRequest
end
- it "should return a Host instance created with the name of each found instance" do
+ it "should return a Host instance created with the name of each found instance", :'fails_on_ruby_1.9.2' => true do
key = stub 'key', :name => "key"
cert = stub 'cert', :name => "cert"
csr = stub 'csr', :name => "csr"
diff --git a/spec/unit/transaction/event_spec.rb b/spec/unit/transaction/event_spec.rb
index 1227802a7..0093baeb9 100755
--- a/spec/unit/transaction/event_spec.rb
+++ b/spec/unit/transaction/event_spec.rb
@@ -5,7 +5,7 @@ require 'puppet/transaction/event'
describe Puppet::Transaction::Event do
[:previous_value, :desired_value, :property, :resource, :name, :message, :file, :line, :tags, :audited].each do |attr|
- it "should support #{attr}" do
+ it "should support #{attr}", :'fails_on_ruby_1.9.2' => true do
event = Puppet::Transaction::Event.new
event.send(attr.to_s + "=", "foo")
event.send(attr).should == "foo"
@@ -16,7 +16,7 @@ describe Puppet::Transaction::Event do
Puppet::Transaction::Event.new(:property => :foo).property.should == "foo"
end
- it "should always convert the resource to a string" do
+ it "should always convert the resource to a string", :'fails_on_ruby_1.9.2' => true do
Puppet::Transaction::Event.new(:resource => :foo).resource.should == "foo"
end
@@ -95,17 +95,17 @@ describe Puppet::Transaction::Event do
end
end
- it "should use the source description as the source if one is set" do
+ it "should use the source description as the source if one is set", :'fails_on_ruby_1.9.2' => true do
Puppet::Util::Log.expects(:new).with { |args| args[:source] == "/my/param" }
Puppet::Transaction::Event.new(:source_description => "/my/param", :resource => "Foo[bar]", :property => "foo").send_log
end
- it "should use the property as the source if one is available and no source description is set" do
+ it "should use the property as the source if one is available and no source description is set", :'fails_on_ruby_1.9.2' => true do
Puppet::Util::Log.expects(:new).with { |args| args[:source] == "foo" }
Puppet::Transaction::Event.new(:resource => "Foo[bar]", :property => "foo").send_log
end
- it "should use the property as the source if one is available and no property or source description is set" do
+ it "should use the property as the source if one is available and no property or source description is set", :'fails_on_ruby_1.9.2' => true do
Puppet::Util::Log.expects(:new).with { |args| args[:source] == "Foo[bar]" }
Puppet::Transaction::Event.new(:resource => "Foo[bar]").send_log
end
diff --git a/spec/unit/type/augeas_spec.rb b/spec/unit/type/augeas_spec.rb
index c8dc207f9..e80da9559 100755
--- a/spec/unit/type/augeas_spec.rb
+++ b/spec/unit/type/augeas_spec.rb
@@ -4,7 +4,7 @@ require 'spec_helper'
augeas = Puppet::Type.type(:augeas)
describe augeas do
- describe "when augeas is present", :if => Puppet.features.augeas? do
+ describe "when augeas is present", :if => Puppet.features.augeas?, :'fails_on_ruby_1.9.2' => true do
it "should have a default provider inheriting from Puppet::Provider" do
augeas.defaultprovider.ancestors.should be_include(Puppet::Provider)
end
diff --git a/spec/unit/type/file_spec.rb b/spec/unit/type/file_spec.rb
index 6cd3ab701..3a01d09c1 100755
--- a/spec/unit/type/file_spec.rb
+++ b/spec/unit/type/file_spec.rb
@@ -300,12 +300,12 @@ describe Puppet::Type.type(:file) do
file[:path].should == "X:/foo/bar/baz"
end
- it "should leave a drive letter with a slash alone" do
+ it "should leave a drive letter with a slash alone", :'fails_on_ruby_1.9.2' => true do
file = Puppet::Type::File.new(:path => "X:/")
file[:path].should == "X:/"
end
- it "should add a slash to a drive letter" do
+ it "should add a slash to a drive letter", :'fails_on_ruby_1.9.2' => true do
file = Puppet::Type::File.new(:path => "X:")
file[:path].should == "X:/"
end
@@ -324,7 +324,7 @@ describe Puppet::Type.type(:file) do
end
describe "when using UNC filenames" do
- describe "on Microsoft Windows systems", :if => Puppet.features.microsoft_windows? do
+ describe "on Microsoft Windows systems", :if => Puppet.features.microsoft_windows?, :'fails_on_ruby_1.9.2' => true do
before do
Puppet.features.stubs(:posix?).returns(false)
Puppet.features.stubs(:microsoft_windows?).returns(true)
diff --git a/spec/unit/type/group_spec.rb b/spec/unit/type/group_spec.rb
index 42fd3fb7b..afe28247a 100755
--- a/spec/unit/type/group_spec.rb
+++ b/spec/unit/type/group_spec.rb
@@ -41,11 +41,11 @@ describe Puppet::Type.type(:group) do
end
end
- it "should have a boolean method for determining if duplicates are allowed" do
+ it "should have a boolean method for determining if duplicates are allowed", :'fails_on_ruby_1.9.2' => true do
@class.new(:name => "foo").methods.should be_include("allowdupe?")
end
- it "should have a boolean method for determining if system groups are allowed" do
+ it "should have a boolean method for determining if system groups are allowed", :'fails_on_ruby_1.9.2' => true do
@class.new(:name => "foo").methods.should be_include("system?")
end
diff --git a/spec/unit/type/resources_spec.rb b/spec/unit/type/resources_spec.rb
index aedc58c7c..48c068cfa 100755
--- a/spec/unit/type/resources_spec.rb
+++ b/spec/unit/type/resources_spec.rb
@@ -51,7 +51,7 @@ describe resources do
@resources.generate.collect { |r| r.ref }.should_not include(@host1.ref)
end
- it "should not include the skipped users" do
+ it "should not include the skipped users", :'fails_on_ruby_1.9.2' => true do
res = Puppet::Type.type(:resources).new :name => :user, :purge => true
res.catalog = Puppet::Resource::Catalog.new
diff --git a/spec/unit/type/schedule_spec.rb b/spec/unit/type/schedule_spec.rb
index 33064ca6f..08ec70cd7 100755
--- a/spec/unit/type/schedule_spec.rb
+++ b/spec/unit/type/schedule_spec.rb
@@ -96,7 +96,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching hourly by distance" do
+ describe Puppet::Type.type(:schedule), "when matching hourly by distance", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -117,7 +117,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching daily by distance" do
+ describe Puppet::Type.type(:schedule), "when matching daily by distance", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -138,7 +138,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching weekly by distance" do
+ describe Puppet::Type.type(:schedule), "when matching weekly by distance", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -159,7 +159,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching monthly by distance" do
+ describe Puppet::Type.type(:schedule), "when matching monthly by distance", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -180,7 +180,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching hourly by number" do
+ describe Puppet::Type.type(:schedule), "when matching hourly by number", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -205,7 +205,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching daily by number" do
+ describe Puppet::Type.type(:schedule), "when matching daily by number", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -236,7 +236,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching weekly by number" do
+ describe Puppet::Type.type(:schedule), "when matching weekly by number", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -261,7 +261,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching monthly by number" do
+ describe Puppet::Type.type(:schedule), "when matching monthly by number", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
@@ -286,7 +286,7 @@ describe Puppet::Type.type(:schedule) do
end
end
- describe Puppet::Type.type(:schedule), "when matching with a repeat greater than one" do
+ describe Puppet::Type.type(:schedule), "when matching with a repeat greater than one", :'fails_on_ruby_1.9.2' => true do
include ScheduleTesting
before do
diff --git a/spec/unit/util/autoload_spec.rb b/spec/unit/util/autoload_spec.rb
index 6d49b57dc..512f06c75 100755
--- a/spec/unit/util/autoload_spec.rb
+++ b/spec/unit/util/autoload_spec.rb
@@ -103,14 +103,14 @@ describe Puppet::Util::Autoload do
end
[RuntimeError, LoadError, SyntaxError].each do |error|
- it "should die an if a #{error.to_s} exception is thrown" do
+ it "should die an if a #{error.to_s} exception is thrown", :'fails_on_ruby_1.9.2' => true do
Kernel.expects(:require).raises error
lambda { @autoload.loadall }.should raise_error(Puppet::Error)
end
end
- it "should require the full path to the file" do
+ it "should require the full path to the file", :'fails_on_ruby_1.9.2' => true do
Kernel.expects(:require).with("/path/to/file.rb")
@autoload.loadall
diff --git a/spec/unit/util/cacher_spec.rb b/spec/unit/util/cacher_spec.rb
index 2e43b4e20..fe93afd2b 100755
--- a/spec/unit/util/cacher_spec.rb
+++ b/spec/unit/util/cacher_spec.rb
@@ -42,7 +42,7 @@ describe Puppet::Util::Cacher do
Puppet::Util::Cacher.singleton_class.ancestors.should be_include(Puppet::Util::Cacher::Expirer)
end
- it "should support defining cached attributes" do
+ it "should support defining cached attributes", :'fails_on_ruby_1.9.2' => true do
CacheTest.methods.should be_include("cached_attr")
end
diff --git a/spec/unit/util/file_locking_spec.rb b/spec/unit/util/file_locking_spec.rb
index 261474263..1a12244b8 100755
--- a/spec/unit/util/file_locking_spec.rb
+++ b/spec/unit/util/file_locking_spec.rb
@@ -16,11 +16,11 @@ describe Puppet::Util::FileLocking do
Puppet::Util::FileLocking.should respond_to(:writelock)
end
- it "should have an instance method for getting a read lock on files" do
+ it "should have an instance method for getting a read lock on files", :'fails_on_ruby_1.9.2' => true do
FileLocker.new.private_methods.should be_include("readlock")
end
- it "should have an instance method for getting a write lock on files" do
+ it "should have an instance method for getting a write lock on files", :'fails_on_ruby_1.9.2' => true do
FileLocker.new.private_methods.should be_include("writelock")
end
diff --git a/spec/unit/util/log_spec.rb b/spec/unit/util/log_spec.rb
index 78411d187..1baa0d5af 100755
--- a/spec/unit/util/log_spec.rb
+++ b/spec/unit/util/log_spec.rb
@@ -93,7 +93,7 @@ describe Puppet::Util::Log do
Puppet::Util::Log.new(:level => "notice", :message => :foo).level.should == :notice
end
- it "should fail if the level is not a symbol or string" do
+ it "should fail if the level is not a symbol or string", :'fails_on_ruby_1.9.2' => true do
lambda { Puppet::Util::Log.new(:level => 50, :message => :foo) }.should raise_error(ArgumentError)
end
@@ -206,7 +206,7 @@ describe Puppet::Util::Log do
end
end
- describe "to_yaml" do
+ describe "to_yaml", :'fails_on_ruby_1.9.2' => true do
it "should not include the @version attribute" do
log = Puppet::Util::Log.new(:level => "notice", :message => :foo, :version => 100)
log.to_yaml_properties.should_not include('@version')
diff --git a/spec/unit/util/network_device/cisco/device_spec.rb b/spec/unit/util/network_device/cisco/device_spec.rb
index 33242a1ab..8971205d3 100755
--- a/spec/unit/util/network_device/cisco/device_spec.rb
+++ b/spec/unit/util/network_device/cisco/device_spec.rb
@@ -145,7 +145,7 @@ eos
"ATM 0/1.1" => "ATM0/1.1",
"VLAN99" => "VLAN99"
}.each do |input,expected|
- it "should canonicalize #{input} to #{expected}" do
+ it "should canonicalize #{input} to #{expected}", :'fails_on_ruby_1.9.2' => true do
@cisco.canonalize_ifname(input).should == expected
end
end
@@ -232,7 +232,7 @@ eos
@cisco.parse_interface("FastEthernet0/1").should == { :ensure => :absent, :duplex => :auto, :speed => :auto }
end
- it "should be able to parse the sh vlan brief command output" do
+ it "should be able to parse the sh vlan brief command output", :'fails_on_ruby_1.9.2' => true do
@cisco.stubs(:support_vlan_brief?).returns(true)
@transport.stubs(:command).with("sh vlan brief").returns(<<eos)
Switch#sh vlan brief
diff --git a/spec/unit/util/network_device/transport/ssh_spec.rb b/spec/unit/util/network_device/transport/ssh_spec.rb
index 18d22a953..8fc357db3 100755
--- a/spec/unit/util/network_device/transport/ssh_spec.rb
+++ b/spec/unit/util/network_device/transport/ssh_spec.rb
@@ -4,7 +4,7 @@ require File.dirname(__FILE__) + '/../../../../spec_helper'
require 'puppet/util/network_device/transport/ssh'
-describe Puppet::Util::NetworkDevice::Transport::Ssh, :if => Puppet.features.ssh? do
+describe Puppet::Util::NetworkDevice::Transport::Ssh, :if => Puppet.features.ssh?, :'fails_on_ruby_1.9.2' => true do
before(:each) do
@transport = Puppet::Util::NetworkDevice::Transport::Ssh.new()
diff --git a/spec/unit/util/pson_spec.rb b/spec/unit/util/pson_spec.rb
index 63d085a66..9331b9416 100755
--- a/spec/unit/util/pson_spec.rb
+++ b/spec/unit/util/pson_spec.rb
@@ -7,7 +7,7 @@ class PsonUtil
include Puppet::Util::Pson
end
-describe Puppet::Util::Pson do
+describe Puppet::Util::Pson, :'fails_on_ruby_1.9.2' => true do
it "should fail if no data is provided" do
lambda { PsonUtil.new.pson_create("type" => "foo") }.should raise_error(ArgumentError)
end
diff --git a/spec/unit/util/queue/stomp_spec.rb b/spec/unit/util/queue/stomp_spec.rb
index 99c77d0b4..6799becea 100755
--- a/spec/unit/util/queue/stomp_spec.rb
+++ b/spec/unit/util/queue/stomp_spec.rb
@@ -2,14 +2,14 @@
require 'spec_helper'
require 'puppet/util/queue'
-describe Puppet::Util::Queue, :if => Puppet.features.stomp? do
+describe Puppet::Util::Queue, :if => Puppet.features.stomp?, :'fails_on_ruby_1.9.2' => true do
it 'should load :stomp client appropriately' do
Puppet.settings.stubs(:value).returns 'faux_queue_source'
Puppet::Util::Queue.queue_type_to_class(:stomp).name.should == 'Puppet::Util::Queue::Stomp'
end
end
-describe 'Puppet::Util::Queue::Stomp', :if => Puppet.features.stomp? do
+describe 'Puppet::Util::Queue::Stomp', :if => Puppet.features.stomp?, :'fails_on_ruby_1.9.2' => true do
before do
# So we make sure we never create a real client instance.
# Otherwise we'll try to connect, and that's bad.
diff --git a/spec/unit/util/rdoc/parser_spec.rb b/spec/unit/util/rdoc/parser_spec.rb
index c7f99051f..92b50e09b 100755
--- a/spec/unit/util/rdoc/parser_spec.rb
+++ b/spec/unit/util/rdoc/parser_spec.rb
@@ -7,7 +7,7 @@ require 'puppet/util/rdoc/code_objects'
require 'rdoc/options'
require 'rdoc/rdoc'
-describe RDoc::Parser do
+describe RDoc::Parser, :'fails_on_ruby_1.9.2' => true do
before :each do
File.stubs(:stat).with("init.pp")
@top_level = stub_everything 'toplevel', :file_relative_name => "init.pp"
diff --git a/spec/unit/util/rdoc_spec.rb b/spec/unit/util/rdoc_spec.rb
index 067b5b8a7..deae4ef2c 100755
--- a/spec/unit/util/rdoc_spec.rb
+++ b/spec/unit/util/rdoc_spec.rb
@@ -6,7 +6,7 @@ require 'rdoc/rdoc'
describe Puppet::Util::RDoc do
- describe "when generating RDoc HTML documentation" do
+ describe "when generating RDoc HTML documentation", :'fails_on_ruby_1.9.2' => true do
before :each do
@rdoc = stub_everything 'rdoc'
RDoc::RDoc.stubs(:new).returns(@rdoc)
diff --git a/spec/unit/util/selinux_spec.rb b/spec/unit/util/selinux_spec.rb
index 0eaf43cbb..cc70b53c4 100755
--- a/spec/unit/util/selinux_spec.rb
+++ b/spec/unit/util/selinux_spec.rb
@@ -33,7 +33,7 @@ describe Puppet::Util::SELinux do
end
end
- describe "filesystem detection" do
+ describe "filesystem detection", :'fails_on_ruby_1.9.2' => true do
before :each do
fh = stub 'fh', :close => nil
File.stubs(:open).with("/proc/mounts").returns fh
@@ -192,7 +192,7 @@ describe Puppet::Util::SELinux do
end
end
- describe "set_selinux_context" do
+ describe "set_selinux_context", :'fails_on_ruby_1.9.2' => true do
before :each do
fh = stub 'fh', :close => nil
File.stubs(:open).with("/proc/mounts").returns fh