diff options
| -rwxr-xr-x | spec/unit/parser/lexer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
