From c8775f9c5caa883ab3b08695b355d3575263b165 Mon Sep 17 00:00:00 2001 From: Jacob Helwig Date: Mon, 16 May 2011 09:52:04 -0700 Subject: (#7259) Remove ActiveRecord requirement from indirector face spec "should be able to return a list of terminuses for a given indirection" was calling Puppet::Indirector::Face.terminus_classes, which is just a thin wrapper around Puppet::Indirector::Terminus.terminus_classes, which would attempt to load all Terminus classes. This would cause problems if not all of the prerequisites for all of the Terminus classes were installed (For example: ActiveRecord). Now we only test that the thin wrapper appropriately munges the output from Puppet::Indirector::Terminus.terminus_classes, since the method being wrapped should have its own tests for the behavior that was being tested originally. Paired-with: Nick Lewis --- spec/unit/indirector/face_spec.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/spec/unit/indirector/face_spec.rb b/spec/unit/indirector/face_spec.rb index 1530f7270..943ff7991 100755 --- a/spec/unit/indirector/face_spec.rb +++ b/spec/unit/indirector/face_spec.rb @@ -16,8 +16,17 @@ describe Puppet::Indirector::Face do Puppet::Indirector::Face.indirections.should be_include("catalog") end - it "should be able to return a list of terminuses for a given indirection" do - Puppet::Indirector::Face.terminus_classes(:catalog).should be_include("compiler") + it "should return the sorted to_s list of terminus classes" do + Puppet::Indirector::Terminus.expects(:terminus_classes).returns([ + :yaml, + :compiler, + :rest + ]) + Puppet::Indirector::Face.terminus_classes(:catalog).should == [ + 'compiler', + 'rest', + 'yaml' + ] end describe "as an instance" do -- cgit