summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrice Figureau <brice-puppet@daysofwonder.com>2008-12-20 15:30:22 +0100
committerBrice Figureau <brice-puppet@daysofwonder.com>2008-12-20 15:30:22 +0100
commit3b8a77dfd97774c21156efb1553f3a5a0372c7fa (patch)
tree6da580c2be7022c09a833d7a780ea78502b30df7
parentb6e34b7bc8af737927645e405032ab9694456097 (diff)
downloadpuppet-3b8a77dfd97774c21156efb1553f3a5a0372c7fa.tar.gz
puppet-3b8a77dfd97774c21156efb1553f3a5a0372c7fa.tar.xz
puppet-3b8a77dfd97774c21156efb1553f3a5a0372c7fa.zip
Fix #1834 part2 - Fix tests when no rails
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
-rwxr-xr-xspec/unit/parser/collector.rb4
-rwxr-xr-xspec/unit/parser/compiler.rb1
-rwxr-xr-xspec/unit/rails.rb4
3 files changed, 5 insertions, 4 deletions
diff --git a/spec/unit/parser/collector.rb b/spec/unit/parser/collector.rb
index ede583b96..edd74e25f 100755
--- a/spec/unit/parser/collector.rb
+++ b/spec/unit/parser/collector.rb
@@ -194,7 +194,7 @@ describe Puppet::Parser::Collector, "when collecting virtual resources" do
end
describe Puppet::Parser::Collector, "when collecting exported resources" do
- confine Puppet.features.rails? => "Cannot test Rails integration without ActiveRecord"
+ confine "Cannot test Rails integration without ActiveRecord" => Puppet.features.rails?
before do
@scope = stub 'scope', :host => "myhost", :debug => nil
@@ -364,7 +364,7 @@ describe Puppet::Parser::Collector, "when collecting exported resources" do
end
describe Puppet::Parser::Collector, "when building its ActiveRecord query for collecting exported resources" do
- confine Puppet.features.rails? => "Cannot test Rails integration without ActiveRecord"
+ confine "Cannot test Rails integration without ActiveRecord" => Puppet.features.rails?
before do
@scope = stub 'scope', :host => "myhost", :debug => nil
diff --git a/spec/unit/parser/compiler.rb b/spec/unit/parser/compiler.rb
index 203105289..f36b6fd4f 100755
--- a/spec/unit/parser/compiler.rb
+++ b/spec/unit/parser/compiler.rb
@@ -478,6 +478,7 @@ describe Puppet::Parser::Compiler do
end
describe Puppet::Parser::Compiler, "when storing compiled resources" do
+ confine "Cannot test Rails integration without ActiveRecord" => Puppet.features.rails?
it "should store the resources" do
Puppet.features.expects(:rails?).returns(true)
diff --git a/spec/unit/rails.rb b/spec/unit/rails.rb
index 533236772..f0ba2b942 100755
--- a/spec/unit/rails.rb
+++ b/spec/unit/rails.rb
@@ -66,7 +66,7 @@ describe Puppet::Rails, "when initializing any connection" do
end
describe Puppet::Rails, "when initializing a sqlite3 connection" do
- confine Puppet.features.rails? => "Cannot test without ActiveRecord"
+ confine "Cannot test without ActiveRecord" => Puppet.features.rails?
it "should provide the adapter, log_level, and dbfile arguments" do
Puppet.settings.expects(:value).with(:dbadapter).returns("sqlite3")
@@ -82,7 +82,7 @@ describe Puppet::Rails, "when initializing a sqlite3 connection" do
end
describe Puppet::Rails, "when initializing a mysql or postgresql connection" do
- confine Puppet.features.rails? => "Cannot test without ActiveRecord"
+ confine "Cannot test without ActiveRecord" => Puppet.features.rails?
it "should provide the adapter, log_level, and host, username, password, and database arguments" do
Puppet.settings.stubs(:value).with(:dbadapter).returns("mysql")