diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-01-04 16:04:34 -0800 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-01-04 16:04:34 -0800 |
| commit | a05df9fec9040a908f28e4c324845ec80daa54eb (patch) | |
| tree | 489df98ee50d6ac6cf01fb905e78bd4864cde2c0 /spec/unit/parser | |
| parent | ac114371fc161a48fc48bf68944846a1defbc6c4 (diff) | |
| parent | 52760a4fb2764d011609c82adb68cc61d0772dc4 (diff) | |
| download | puppet-a05df9fec9040a908f28e4c324845ec80daa54eb.tar.gz puppet-a05df9fec9040a908f28e4c324845ec80daa54eb.tar.xz puppet-a05df9fec9040a908f28e4c324845ec80daa54eb.zip | |
Merge branch 'ticket/2.6.next/upgrade_rspec' into 2.6.next
Diffstat (limited to 'spec/unit/parser')
| -rwxr-xr-x | spec/unit/parser/collector_spec.rb | 8 | ||||
| -rwxr-xr-x | spec/unit/parser/lexer_spec.rb | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/spec/unit/parser/collector_spec.rb b/spec/unit/parser/collector_spec.rb index 908cda63a..4cab26c44 100755 --- a/spec/unit/parser/collector_spec.rb +++ b/spec/unit/parser/collector_spec.rb @@ -263,9 +263,7 @@ describe Puppet::Parser::Collector, "when collecting virtual and catalog resourc end end -describe Puppet::Parser::Collector, "when collecting exported resources" do - confine "Cannot test Rails integration without ActiveRecord" => Puppet.features.rails? - +describe Puppet::Parser::Collector, "when collecting exported resources", :if => Puppet.features.rails? do before do @compiler = Puppet::Parser::Compiler.new(Puppet::Node.new("mynode")) @scope = Puppet::Parser::Scope.new :compiler => @compiler @@ -469,9 +467,7 @@ describe Puppet::Parser::Collector, "when collecting exported resources" do end end -describe Puppet::Parser::Collector, "when building its ActiveRecord query for collecting exported resources" do - confine "Cannot test Rails integration without ActiveRecord" => Puppet.features.rails? - +describe Puppet::Parser::Collector, "when building its ActiveRecord query for collecting exported resources", :if => Puppet.features.rails? do before do @scope = stub 'scope', :host => "myhost", :debug => nil @compiler = mock 'compile' diff --git a/spec/unit/parser/lexer_spec.rb b/spec/unit/parser/lexer_spec.rb index d52add399..860326973 100755 --- a/spec/unit/parser/lexer_spec.rb +++ b/spec/unit/parser/lexer_spec.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.define :be_like do |*expected| +RSpec::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 @@ -651,7 +651,8 @@ describe "Puppet::Parser::Lexer in the old tests" do end end -require 'puppettest/support/utils' +require File.dirname(__FILE__) + '/../../../test/lib/puppettest' +require File.dirname(__FILE__) + '/../../../test/lib/puppettest/support/utils' describe "Puppet::Parser::Lexer in the old tests when lexing example files" do extend PuppetTest::Support::Utils textfiles do |file| |
