[Pkg-puppet-devel] [SCM] Puppet packaging for Debian branch, experimental, updated. debian/2.6.8-1-844-g7ec39d5

Daniel Pittman daniel at puppetlabs.com
Tue May 10 08:13:51 UTC 2011


The following commit has been merged in the experimental branch:
commit cc0f4141e17939bdfa4e8e6f84921161041507ef
Author: Daniel Pittman <daniel at puppetlabs.com>
Date:   Tue Apr 12 20:49:18 2011 -0700

    maint: ensure we handle '-foo=' options correctly in faces.
    
    This is legal, and defines an option with an argument for optparse; we want to
    make sure that we stay consistent with that in our code handling the same sort
    of inputs.
    
    This also adds a framework for later testing any other strange naming bits and
    bobs we find around option handling.
    
    Reviewed-By: Pieter van de Bruggen <pieter at puppetlabs.com>

diff --git a/spec/shared_behaviours/things_that_declare_options.rb b/spec/shared_behaviours/things_that_declare_options.rb
index 1b41c22..f7512de 100755
--- a/spec/shared_behaviours/things_that_declare_options.rb
+++ b/spec/shared_behaviours/things_that_declare_options.rb
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
 shared_examples_for "things that declare options" do
   it "should support options without arguments" do
     subject = add_options_to { option "--bar" }
@@ -15,6 +14,13 @@ shared_examples_for "things that declare options" do
     subject.should be_option :foo
   end
 
+  { "--foo=" => :foo }.each do |input, option|
+    it "should accept #{name.inspect}" do
+      subject = add_options_to { option input }
+      subject.should be_option option
+    end
+  end
+
   it "should support option documentation" do
     text = "Sturm und Drang (German pronunciation: [ˈʃtʊʁm ʊnt ˈdʁaŋ]) …"
 

-- 
Puppet packaging for Debian



More information about the Pkg-puppet-devel mailing list