diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-01-06 15:56:31 -0800 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-01-06 15:56:31 -0800 |
| commit | f663182c28c9d4533ad4c2f897e5fbbf78b16d8e (patch) | |
| tree | 28da3fd7c329de073e71b5b1ba1be01ec4e54b6f /spec/unit/parser | |
| parent | c7764723578ae64240db7bd2a64f8e6e9fa708ab (diff) | |
| parent | b16e10dba6606b808ef195f4b57f2e8c66cf65ab (diff) | |
Merge branch 'intermediate_merge_branch' into 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 ff81795c4..100a04daf 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 67d75823b..58978ff03 100755 --- a/spec/unit/parser/lexer_spec.rb +++ b/spec/unit/parser/lexer_spec.rb @@ -5,7 +5,7 @@ require File.expand_path(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| |
