diff options
| author | Luke Kanies <luke@madstop.com> | 2009-04-23 18:56:57 -0500 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-04-25 01:19:51 +1000 |
| commit | 5f6b5c0efe5210583a1040f902af2ff0709f3ca9 (patch) | |
| tree | 8851f4dbe58bae3fd10c2210d946e621782e24c5 /spec/integration | |
| parent | 8ed7ae3a23dd84dfc7ef835c2bb36f7ee4cfe9e5 (diff) | |
| download | puppet-5f6b5c0efe5210583a1040f902af2ff0709f3ca9.tar.gz puppet-5f6b5c0efe5210583a1040f902af2ff0709f3ca9.tar.xz puppet-5f6b5c0efe5210583a1040f902af2ff0709f3ca9.zip | |
Failing to enable storeconfigs if ActiveRecord isn't available
This is the last step to fixing #2189.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/integration')
| -rwxr-xr-x | spec/integration/defaults.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb index 6ec42f493..003712aab 100755 --- a/spec/integration/defaults.rb +++ b/spec/integration/defaults.rb @@ -94,6 +94,8 @@ describe "Puppet defaults" do Puppet::Resource::Catalog.stubs(:cache_class=) Puppet::Node::Facts.stubs(:cache_class=) Puppet::Node.stubs(:cache_class=) + + Puppet.features.stubs(:rails?).returns true end it "should set the Catalog cache class to :active_record" do @@ -116,6 +118,11 @@ describe "Puppet defaults" do Puppet::Node.expects(:cache_class=).with(:active_record) Puppet.settings[:storeconfigs] = true end + + it "should fail if rails is not available" do + Puppet.features.stubs(:rails?).returns false + lambda { Puppet.settings[:storeconfigs] = true }.should raise_error + end end describe "when enabling asynchronous storeconfigs" do |
