diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-15 15:18:13 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-04-15 15:25:10 -0700 |
| commit | ab541fa0976bdce395a072bf0c391146b99d4219 (patch) | |
| tree | 245995c3980fcb059b1ddba5c8c84ace3af53bf2 /spec | |
| parent | f770325884ebef493cb8ca6060a65355211125b9 (diff) | |
| download | puppet-ab541fa0976bdce395a072bf0c391146b99d4219.tar.gz puppet-ab541fa0976bdce395a072bf0c391146b99d4219.tar.xz puppet-ab541fa0976bdce395a072bf0c391146b99d4219.zip | |
(#7059) Use option hooks for the indirector terminus option.
We used to open-code terminus setting, which had a bunch of duplicate code.
Now, instead, we use the option hooks, resulting in the same behaviour with
much less code.
Paired-With: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'spec')
| -rwxr-xr-x | spec/unit/application/indirection_base_spec.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/unit/application/indirection_base_spec.rb b/spec/unit/application/indirection_base_spec.rb index 63ab11eed..57740384a 100755 --- a/spec/unit/application/indirection_base_spec.rb +++ b/spec/unit/application/indirection_base_spec.rb @@ -23,12 +23,11 @@ describe Puppet::Application::IndirectionBase do it "should accept a terminus command line option" 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 = mock("test indirection terminus") + terminus = stub_everything("test indirection terminus") Puppet::Indirector::Indirection.expects(:instance). - with(:testindirection).twice.returns() + with(:testindirection).returns(terminus) - subject.command_line. - instance_variable_set('@args', %w{--terminus foo save}) + subject.command_line.instance_variable_set('@args', %w{--terminus foo save}) # Not a very nice thing. :( $stderr.stubs(:puts) |
