summaryrefslogtreecommitdiffstats
path: root/spec/unit
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@puppetlabs.com>2011-04-21 16:33:59 -0700
committerDaniel Pittman <daniel@puppetlabs.com>2011-04-21 16:33:59 -0700
commit3c22e770625f3cc788b0d138c8101e259a534736 (patch)
treea5421861cc9472412d034f66e94b30dbe60a7705 /spec/unit
parent681edda370ec3d33aca0ca61864ec4352cafe567 (diff)
parentff08ba2abc8a59caa2bae0cde0a84ded99337e1c (diff)
downloadpuppet-3c22e770625f3cc788b0d138c8101e259a534736.tar.gz
puppet-3c22e770625f3cc788b0d138c8101e259a534736.tar.xz
puppet-3c22e770625f3cc788b0d138c8101e259a534736.zip
Merge remote-tracking branch 'remotes/lak/tickets/next/7118-summaries_for_all_faces' into 2.7.x
Fix conflicts due to version drift in: lib/puppet/face/certificate.rb lib/puppet/face/facts.rb lib/puppet/face/node.rb lib/puppet/face/secret_agent.rb spec/lib/puppet/face/basetest.rb spec/unit/face/help_spec.rb Reviewed-By: Markus Roberts <markus@puppetlabs.com>
Diffstat (limited to 'spec/unit')
-rwxr-xr-xspec/unit/application/indirection_base_spec.rb1
-rwxr-xr-xspec/unit/face/help_spec.rb12
2 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/application/indirection_base_spec.rb b/spec/unit/application/indirection_base_spec.rb
index 57740384a..0d7554aae 100755
--- a/spec/unit/application/indirection_base_spec.rb
+++ b/spec/unit/application/indirection_base_spec.rb
@@ -9,6 +9,7 @@ class Puppet::Application::TestIndirection < Puppet::Application::IndirectionBas
end
face = Puppet::Face::Indirector.define(:testindirection, '0.0.1') do
+ summary "fake summary"
end
# REVISIT: This horror is required because we don't allow anything to be
# :current except for if it lives on, and is loaded from, disk. --daniel 2011-03-29
diff --git a/spec/unit/face/help_spec.rb b/spec/unit/face/help_spec.rb
index faa5f9617..f28c4f273 100755
--- a/spec/unit/face/help_spec.rb
+++ b/spec/unit/face/help_spec.rb
@@ -46,6 +46,12 @@ describe Puppet::Face[:help, '0.0.1'] do
context "when listing subcommands" do
subject { Puppet::Face[:help, :current].help }
+ RSpec::Matchers.define :have_a_summary do
+ match do |instance|
+ instance.summary.is_a?(String)
+ end
+ end
+
# Check a precondition for the next block; if this fails you have
# something odd in your set of face, and we skip testing things that
# matter. --daniel 2011-04-10
@@ -65,6 +71,12 @@ describe Puppet::Face[:help, '0.0.1'] do
end
end
+ Puppet::Face.faces.each do |name|
+ it "should have a summary for #{name}" do
+ Puppet::Face[name, :current].should have_a_summary
+ end
+ end
+
it "should list all legacy applications" do
Puppet::Face[:help, :current].legacy_applications.each do |appname|
subject.should =~ %r{ #{appname} }