diff options
| author | Nick Lewis <nick@puppetlabs.com> | 2011-06-08 18:41:16 -0700 |
|---|---|---|
| committer | Nick Lewis <nick@puppetlabs.com> | 2011-06-08 18:41:16 -0700 |
| commit | 8ccd00963d91f168438eaec4b29a18cd4a1ac583 (patch) | |
| tree | 85e15c5ef9390454438fb300c5baa38a7f2f5f3e /spec/unit | |
| parent | 376e0f04af01810d00eede4de52744bb8c8e1681 (diff) | |
| parent | d4c499dfdbd94f5272278e1ba87a75915607c3d7 (diff) | |
| download | puppet-8ccd00963d91f168438eaec4b29a18cd4a1ac583.tar.gz puppet-8ccd00963d91f168438eaec4b29a18cd4a1ac583.tar.xz puppet-8ccd00963d91f168438eaec4b29a18cd4a1ac583.zip | |
Merge branch '2.7rc' into 2.7.x
Diffstat (limited to 'spec/unit')
| -rwxr-xr-x | spec/unit/interface/documentation_spec.rb | 34 | ||||
| -rwxr-xr-x | spec/unit/transaction_spec.rb | 2 |
2 files changed, 34 insertions, 2 deletions
diff --git a/spec/unit/interface/documentation_spec.rb b/spec/unit/interface/documentation_spec.rb new file mode 100755 index 000000000..6865b9073 --- /dev/null +++ b/spec/unit/interface/documentation_spec.rb @@ -0,0 +1,34 @@ +#!/usr/bin/env rspec +require 'spec_helper' +require 'puppet/interface' +require 'puppet/interface/option' +require 'puppet/interface/documentation' + +class Puppet::Interface::TinyDocs::Test + include Puppet::Interface::TinyDocs + attr_accessor :name, :options + def initialize + self.name = "tinydoc-test" + self.options = [] + end + + def get_option(name) + Puppet::Interface::Option.new(nil, "--#{name}") + end +end + +describe Puppet::Interface::TinyDocs do + subject { Puppet::Interface::TinyDocs::Test.new } + + context "#build_synopsis" do + before :each do + subject.options = [:foo, :bar] + end + + it { should respond_to :build_synopsis } + + it "should put a space between options (#7828)" do + subject.build_synopsis('baz').should =~ /#{Regexp.quote('[--foo] [--bar]')}/ + end + end +end diff --git a/spec/unit/transaction_spec.rb b/spec/unit/transaction_spec.rb index d7788c06c..4bf615803 100755 --- a/spec/unit/transaction_spec.rb +++ b/spec/unit/transaction_spec.rb @@ -94,8 +94,6 @@ describe Puppet::Transaction do @transaction.report.should == report end - it "should consider a resource to have failed dependencies if any of its dependencies are failed" - describe "when initializing" do it "should create an event manager" do @transaction = Puppet::Transaction.new(Puppet::Resource::Catalog.new) |
