diff options
| author | James Turnbull <james@lovedthanlost.net> | 2010-06-10 09:49:10 +1000 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2010-06-10 09:49:10 +1000 |
| commit | a2e809bbb2fc95ae571223ae27b5e61bcd2c3196 (patch) | |
| tree | 3d2b32ea0c05278866e8063c73830a38d43ba5ab /spec/unit/parser | |
| parent | f054d5b6abe2de3810203b13c8f263d9a23f0d50 (diff) | |
| download | puppet-a2e809bbb2fc95ae571223ae27b5e61bcd2c3196.tar.gz puppet-a2e809bbb2fc95ae571223ae27b5e61bcd2c3196.tar.xz puppet-a2e809bbb2fc95ae571223ae27b5e61bcd2c3196.zip | |
Fixed RSpec deprecation notice in lexer tests
Diffstat (limited to 'spec/unit/parser')
| -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 |
