diff options
| author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-22 13:19:25 -0700 |
|---|---|---|
| committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-22 14:05:47 -0700 |
| commit | a58bf959ec49c033e0498916a09e77e303c5792e (patch) | |
| tree | 5f0a049580cc9d2a7fe568c3fd9c1cef312ac841 /spec/unit/interface | |
| parent | 45613e0f192778cd16f945d5d1eb109e6c8dee2d (diff) | |
| download | puppet-a58bf959ec49c033e0498916a09e77e303c5792e.tar.gz puppet-a58bf959ec49c033e0498916a09e77e303c5792e.tar.xz puppet-a58bf959ec49c033e0498916a09e77e303c5792e.zip | |
(#6786) Change interface storage and access.
Ruby's namespace mechanism introduced a number of problems, including
incorrect name resolution for common and simple cases. Given that,
we've refactored back to class-level data structures with accessor
methods available.
The current method names are unlikely to be the final UI.
Reviewed-By: Daniel Pittman
Diffstat (limited to 'spec/unit/interface')
| -rw-r--r-- | spec/unit/interface/catalog_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/certificate_request_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/certificate_revocation_list_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/certificate_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/config_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/configurer_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/facts_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/file_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/key_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/node_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/report_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/resource_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/resource_type_spec.rb | 4 |
13 files changed, 26 insertions, 26 deletions
diff --git a/spec/unit/interface/catalog_spec.rb b/spec/unit/interface/catalog_spec.rb index 574842754..8eb0040ff 100644 --- a/spec/unit/interface/catalog_spec.rb +++ b/spec/unit/interface/catalog_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/catalog' -describe Puppet::Interface::Catalog do +describe Puppet::Interface.interface(:catalog) do before do - @interface = Puppet::Interface::Catalog + @interface = Puppet::Interface.interface(:catalog) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/certificate_request_spec.rb b/spec/unit/interface/certificate_request_spec.rb index fa9e819b4..8a613e5e5 100644 --- a/spec/unit/interface/certificate_request_spec.rb +++ b/spec/unit/interface/certificate_request_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/certificate_request' -describe Puppet::Interface::CertificateRequest do +describe Puppet::Interface.interface(:certificate_request) do before do - @interface = Puppet::Interface::CertificateRequest + @interface = Puppet::Interface.interface(:certificate_request) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/certificate_revocation_list_spec.rb b/spec/unit/interface/certificate_revocation_list_spec.rb index 3fc981bd4..8ee341bef 100644 --- a/spec/unit/interface/certificate_revocation_list_spec.rb +++ b/spec/unit/interface/certificate_revocation_list_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/certificate_revocation_list' -describe Puppet::Interface::CertificateRevocationList do +describe Puppet::Interface.interface(:certificate_revocation_list) do before do - @interface = Puppet::Interface::CertificateRevocationList + @interface = Puppet::Interface.interface(:certificate_revocation_list) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/certificate_spec.rb b/spec/unit/interface/certificate_spec.rb index 6b5f9224b..47ddcb52e 100644 --- a/spec/unit/interface/certificate_spec.rb +++ b/spec/unit/interface/certificate_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/certificate' -describe Puppet::Interface::Certificate do +describe Puppet::Interface.interface(:certificate) do before do - @interface = Puppet::Interface::Certificate + @interface = Puppet::Interface.interface(:certificate) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/config_spec.rb b/spec/unit/interface/config_spec.rb index 683e8abae..79c65f2ac 100644 --- a/spec/unit/interface/config_spec.rb +++ b/spec/unit/interface/config_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/config' -describe Puppet::Interface::Config do +describe Puppet::Interface.interface(:config) do before do - @interface = Puppet::Interface::Config + @interface = Puppet::Interface.interface(:config) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/configurer_spec.rb b/spec/unit/interface/configurer_spec.rb index 99f5f7ad7..4b3532c1b 100644 --- a/spec/unit/interface/configurer_spec.rb +++ b/spec/unit/interface/configurer_spec.rb @@ -5,7 +5,7 @@ require 'puppet/interface/configurer' require 'puppet/indirector/catalog/rest' require 'tempfile' -describe Puppet::Interface::Configurer do +describe Puppet::Interface.interface(:configurer) do describe "#synchronize" do it "should retrieve and apply a catalog and return a report" do dirname = Dir.mktmpdir("puppetdir") @@ -16,7 +16,7 @@ describe Puppet::Interface::Configurer do @catalog.add_resource(@file) Puppet::Resource::Catalog::Rest.any_instance.stubs(:find).returns(@catalog) - report = Puppet::Interface::Configurer.synchronize("foo") + report = Puppet::Interface.interface(:configurer).synchronize("foo") report.kind.should == "apply" report.status.should == "changed" diff --git a/spec/unit/interface/facts_spec.rb b/spec/unit/interface/facts_spec.rb index c311b5d3d..03d6410f9 100644 --- a/spec/unit/interface/facts_spec.rb +++ b/spec/unit/interface/facts_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/facts' -describe Puppet::Interface::Facts do +describe Puppet::Interface.interface(:facts) do before do - @interface = Puppet::Interface::Facts + @interface = Puppet::Interface.interface(:facts) end it "should define an 'upload' fact" do diff --git a/spec/unit/interface/file_spec.rb b/spec/unit/interface/file_spec.rb index 1d9e55752..fc7accf0d 100644 --- a/spec/unit/interface/file_spec.rb +++ b/spec/unit/interface/file_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/file' -describe Puppet::Interface::File do +describe Puppet::Interface.interface(:file) do before do - @interface = Puppet::Interface::File + @interface = Puppet::Interface.interface(:file) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/key_spec.rb b/spec/unit/interface/key_spec.rb index 9be024445..93a7c937c 100644 --- a/spec/unit/interface/key_spec.rb +++ b/spec/unit/interface/key_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/key' -describe Puppet::Interface::Key do +describe Puppet::Interface.interface(:key) do before do - @interface = Puppet::Interface::Key + @interface = Puppet::Interface.interface(:key) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/node_spec.rb b/spec/unit/interface/node_spec.rb index cfb15e38a..63109308d 100644 --- a/spec/unit/interface/node_spec.rb +++ b/spec/unit/interface/node_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/node' -describe Puppet::Interface::Node do +describe Puppet::Interface.interface(:node) do before do - @interface = Puppet::Interface::Node + @interface = Puppet::Interface.interface(:node) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/report_spec.rb b/spec/unit/interface/report_spec.rb index 932fc5cc9..b5bee1a62 100644 --- a/spec/unit/interface/report_spec.rb +++ b/spec/unit/interface/report_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/report' -describe Puppet::Interface::Report do +describe Puppet::Interface.interface(:report) do before do - @interface = Puppet::Interface::Report + @interface = Puppet::Interface.interface(:report) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/resource_spec.rb b/spec/unit/interface/resource_spec.rb index b28b04310..cad45b66b 100644 --- a/spec/unit/interface/resource_spec.rb +++ b/spec/unit/interface/resource_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/resource' -describe Puppet::Interface::Resource do +describe Puppet::Interface.interface(:resource) do before do - @interface = Puppet::Interface::Resource + @interface = Puppet::Interface.interface(:resource) end it "should be a subclass of 'Indirection'" do diff --git a/spec/unit/interface/resource_type_spec.rb b/spec/unit/interface/resource_type_spec.rb index 95b9ec7f1..6c437c475 100644 --- a/spec/unit/interface/resource_type_spec.rb +++ b/spec/unit/interface/resource_type_spec.rb @@ -3,9 +3,9 @@ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/interface/resource_type' -describe Puppet::Interface::ResourceType do +describe Puppet::Interface.interface(:resource_type) do before do - @interface = Puppet::Interface::ResourceType + @interface = Puppet::Interface.interface(:resource_type) end it "should be a subclass of 'Indirection'" do |
