summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-01-05 15:54:00 -0800
committerNick Lewis <nick@puppetlabs.com>2011-01-05 15:54:00 -0800
commit19eb1e78e115d10bfb822e510213e4fab9cd2599 (patch)
treed5068dfd7a3890c7b5961779c87681b930cf3144 /spec/unit/parser
parentcc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4 (diff)
parent83ac3e789ddc8dbf40c93460032474870fb16c54 (diff)
downloadpuppet-19eb1e78e115d10bfb822e510213e4fab9cd2599.tar.gz
puppet-19eb1e78e115d10bfb822e510213e4fab9cd2599.tar.xz
puppet-19eb1e78e115d10bfb822e510213e4fab9cd2599.zip
Merge branch '2.6.next' into 2.6.x
Diffstat (limited to 'spec/unit/parser')
-rwxr-xr-xspec/unit/parser/collector_spec.rb8
-rwxr-xr-xspec/unit/parser/lexer_spec.rb5
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|