summaryrefslogtreecommitdiffstats
path: root/spec/unit/application
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-05-26 15:44:43 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-05-26 16:08:32 -0700
commitea7908b8d6dc2092b7a7ff4b92452821a3afd86b (patch)
treeef09a7f71b01d605be546846d0cf89284b18cc67 /spec/unit/application
parent2aa9f2fe390c15806cce5532afed2fc7ecf51b8b (diff)
downloadpuppet-ea7908b8d6dc2092b7a7ff4b92452821a3afd86b.tar.gz
puppet-ea7908b8d6dc2092b7a7ff4b92452821a3afd86b.tar.xz
puppet-ea7908b8d6dc2092b7a7ff4b92452821a3afd86b.zip
maint: Fix order dependent spec failure for face indirection
An indirected face is being created in spec/unit/application/indirection_base_spec.rb that uses a stubbed out indirection. This stub didn't have a name method defined, which caused the documentation_spec.rb, that does checks against every available face, to blow up with: expected no Exception, got #<NoMethodError: undefined method `to_sym' for nil:NilClass> in lib/puppet/face/indirector/face.rb when listing the indirections for the help text. I toyed with creating a real indirection for the test, but that was harder than expected. Paired-with: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'spec/unit/application')
-rwxr-xr-xspec/unit/application/indirection_base_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/application/indirection_base_spec.rb b/spec/unit/application/indirection_base_spec.rb
index d72def6cf..8a5eee2c6 100755
--- a/spec/unit/application/indirection_base_spec.rb
+++ b/spec/unit/application/indirection_base_spec.rb
@@ -19,7 +19,6 @@ face.instance_variable_set('@version', :current)
Puppet::Face.register(face)
########################################################################
-
describe Puppet::Application::IndirectionBase do
subject { Puppet::Application::TestIndirection.new }
@@ -27,6 +26,8 @@ describe Puppet::Application::IndirectionBase do
# It would be nice not to have to stub this, but whatever... writing an
# entire indirection stack would cause us more grief. --daniel 2011-03-31
terminus = stub_everything("test indirection terminus")
+ terminus.stubs(:name).returns(:testindirection)
+
Puppet::Indirector::Indirection.expects(:instance).
with(:testindirection).returns(terminus)