Specifically, add them if they are not already added by rspec itself, which
means that we can use them without blowing up older installations.
---
 spec/spec_helper.rb |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 1dcf3c2..a01ae56 100755
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -102,3 +102,15 @@ RSpec::Matchers.define :exit_with do |expected|
     "expect exit with #{expected}"
   end
 end
+
+# Backward compatibility for Jenkins outdated environment.
+module RSpec
+  module Matchers
+    module BlockAliases
+      alias_method :to,     :should      unless method_defined? :to
+      alias_method :to_not, :should_not  unless method_defined? :to_not
+      alias_method :not_to, :should_not  unless method_defined? :not_to
+    end
+  end
+end
+
-- 
1.7.4.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to