From a2e809bbb2fc95ae571223ae27b5e61bcd2c3196 Mon Sep 17 00:00:00 2001 From: James Turnbull Date: Thu, 10 Jun 2010 09:49:10 +1000 Subject: Fixed RSpec deprecation notice in lexer tests --- spec/unit/parser/lexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/unit/parser') diff --git a/spec/unit/parser/lexer.rb b/spec/unit/parser/lexer.rb index 204cde759..480a416e0 100755 --- a/spec/unit/parser/lexer.rb +++ b/spec/unit/parser/lexer.rb @@ -5,7 +5,7 @@ require File.dirname(__FILE__) + '/../../spec_helper' require 'puppet/parser/lexer' # This is a special matcher to match easily lexer output -Spec::Matchers.create :be_like do |*expected| +Spec::Matchers.define :be_like do |*expected| match do |actual| expected.zip(actual).all? { |e,a| !e or a[0] == e or (e.is_a? Array and a[0] == e[0] and (a[1] == e[1] or (a[1].is_a?(Hash) and a[1][:value] == e[1]))) } end -- cgit