From 2aa9f2fe390c15806cce5532afed2fc7ecf51b8b Mon Sep 17 00:00:00 2001 From: Matt Robinson Date: Thu, 26 May 2011 14:54:11 -0700 Subject: (#7690) Don't blow up when listing terminuses available for faces Previously, in order to list the available terminuses for an indirected face we loaded all the the terminuses in order to list them. This meant that if a terminus like active_record didn't have the dependencies it needed, the documentation would raise errors and not list terminuses. Now we just list the terminuses available in the load path without trying to load them. The terminus will still raise an error if you try to use it without its dependencies being met. Paired-with: Max Martin --- spec/unit/indirector/terminus_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'spec/unit') diff --git a/spec/unit/indirector/terminus_spec.rb b/spec/unit/indirector/terminus_spec.rb index 33932cfca..2f37c1ff5 100755 --- a/spec/unit/indirector/terminus_spec.rb +++ b/spec/unit/indirector/terminus_spec.rb @@ -242,3 +242,9 @@ describe Puppet::Indirector::Terminus, " when creating terminus class types", :' end end +describe Puppet::Indirector::Terminus, " when listing terminus classes" do + it "should list the terminus files available to load" do + Puppet::Util::Autoload.any_instance.stubs(:files_to_load).returns ["/foo/bar/baz", "/max/runs/marathon"] + Puppet::Indirector::Terminus.terminus_classes('my_stuff').should == [:baz, :marathon] + end +end -- cgit