diff options
| author | Daniel Pittman <daniel@puppetlabs.com> | 2011-03-28 10:47:09 -0700 |
|---|---|---|
| committer | Daniel Pittman <daniel@puppetlabs.com> | 2011-03-28 10:47:09 -0700 |
| commit | 2ad8c96935ec53c2d98201ad77fd070dc40dadb6 (patch) | |
| tree | f8f4d581c3b0445df836d5e55945f62547239598 /spec/unit/application | |
| parent | 88aeb04a50d8997b5e1e0ed7a5a2239508b174ee (diff) | |
| parent | b859baa04737644e40002f511c5941d002a956e3 (diff) | |
| download | puppet-2ad8c96935ec53c2d98201ad77fd070dc40dadb6.tar.gz puppet-2ad8c96935ec53c2d98201ad77fd070dc40dadb6.tar.xz puppet-2ad8c96935ec53c2d98201ad77fd070dc40dadb6.zip | |
Merge branch 'maint/master/puppet-strings-is-the-official-api-name'
Diffstat (limited to 'spec/unit/application')
| -rwxr-xr-x[-rw-r--r--] | spec/unit/application/config_spec.rb | 4 | ||||
| -rwxr-xr-x[-rw-r--r--] | spec/unit/application/indirection_base_spec.rb | 2 | ||||
| -rw-r--r-- | spec/unit/application/interface_spec.rb | 10 | ||||
| -rwxr-xr-x[-rw-r--r--] | spec/unit/application/string_base_spec.rb (renamed from spec/unit/application/interface_base_spec.rb) | 26 | ||||
| -rwxr-xr-x | spec/unit/application/string_spec.rb | 10 |
5 files changed, 26 insertions, 26 deletions
diff --git a/spec/unit/application/config_spec.rb b/spec/unit/application/config_spec.rb index 3d894a89c..a45adc8d3 100644..100755 --- a/spec/unit/application/config_spec.rb +++ b/spec/unit/application/config_spec.rb @@ -4,7 +4,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/application/config' describe Puppet::Application::Config do - it "should be a subclass of Puppet::Application::InterfaceBase" do - Puppet::Application::Config.superclass.should equal(Puppet::Application::InterfaceBase) + it "should be a subclass of Puppet::Application::StringBase" do + Puppet::Application::Config.superclass.should equal(Puppet::Application::StringBase) end end diff --git a/spec/unit/application/indirection_base_spec.rb b/spec/unit/application/indirection_base_spec.rb index 2e7bd65a9..ecc49d9a9 100644..100755 --- a/spec/unit/application/indirection_base_spec.rb +++ b/spec/unit/application/indirection_base_spec.rb @@ -7,6 +7,6 @@ describe Puppet::Application::IndirectionBase do it "should support a 'from' terminus" describe "setup" do - it "should fail if its interface does not support an indirection" + it "should fail if its string does not support an indirection" end end diff --git a/spec/unit/application/interface_spec.rb b/spec/unit/application/interface_spec.rb deleted file mode 100644 index 153e9bdc1..000000000 --- a/spec/unit/application/interface_spec.rb +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env ruby - -require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -require 'puppet/application/interface' - -describe Puppet::Application::Interface do - it "should be an application" do - Puppet::Application::Interface.superclass.should equal(Puppet::Application) - end -end diff --git a/spec/unit/application/interface_base_spec.rb b/spec/unit/application/string_base_spec.rb index d82325bfd..bc563e11d 100644..100755 --- a/spec/unit/application/interface_base_spec.rb +++ b/spec/unit/application/string_base_spec.rb @@ -1,14 +1,14 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -require 'puppet/application/interface_base' +require 'puppet/application/string_base' -describe Puppet::Application::InterfaceBase do +describe Puppet::Application::StringBase do before :all do @dir = Dir.mktmpdir $LOAD_PATH.push(@dir) - FileUtils.mkdir_p(File.join @dir, 'puppet', 'interface', 'v0.0.1') - FileUtils.touch(File.join @dir, 'puppet', 'interface', 'v0.0.1', 'basetest.rb') + FileUtils.mkdir_p(File.join @dir, 'puppet', 'string', 'v0.0.1') + FileUtils.touch(File.join @dir, 'puppet', 'string', 'v0.0.1', 'basetest.rb') end after :all do @@ -16,13 +16,13 @@ describe Puppet::Application::InterfaceBase do $LOAD_PATH.pop end - base_interface = Puppet::Interface.define(:basetest, '0.0.1') - class Puppet::Application::InterfaceBase::Basetest < Puppet::Application::InterfaceBase + base_string = Puppet::String.define(:basetest, '0.0.1') + class Puppet::Application::StringBase::Basetest < Puppet::Application::StringBase end before do - @app = Puppet::Application::InterfaceBase::Basetest.new - @app.stubs(:interface).returns base_interface + @app = Puppet::Application::StringBase::Basetest.new + @app.stubs(:string).returns base_string @app.stubs(:exit) @app.stubs(:puts) Puppet::Util::Log.stubs(:newdestination) @@ -32,11 +32,11 @@ describe Puppet::Application::InterfaceBase do before do @app.verb = :find @app.arguments = ["myname", "myarg"] - @app.interface.stubs(:find) + @app.string.stubs(:find) end - it "should send the specified verb and name to the interface" do - @app.interface.expects(:find).with("myname", "myarg") + it "should send the specified verb and name to the string" do + @app.string.expects(:find).with("myname", "myarg") @app.main end @@ -63,11 +63,11 @@ describe Puppet::Application::InterfaceBase do @app.arguments.should == ["myname", "myarg"] end - it "should set the options on the interface" do + it "should set the options on the string" do @app.options[:foo] = "bar" @app.setup - @app.interface.options.should == @app.options + @app.string.options.should == @app.options end end end diff --git a/spec/unit/application/string_spec.rb b/spec/unit/application/string_spec.rb new file mode 100755 index 000000000..13af0a546 --- /dev/null +++ b/spec/unit/application/string_spec.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby + +require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') +require 'puppet/application/string' + +describe Puppet::Application::String do + it "should be an application" do + Puppet::Application::String.superclass.should equal(Puppet::Application) + end +end |
