diff --git a/spec/unit/application/certificate.rb b/spec/unit/application/certificate_spec.rb similarity index 100% rename from spec/unit/application/certificate.rb rename to spec/unit/application/certificate_spec.rb diff --git a/spec/unit/string/catalog_spec.rb b/spec/unit/string/catalog_spec.rb index a11d29a04..70dadd54b 100755 --- a/spec/unit/string/catalog_spec.rb +++ b/spec/unit/string/catalog_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:catalog, '0.0.1') do +describe Puppet::String[:catalog, '0.0.1'] do end diff --git a/spec/unit/string/certificate_request_spec.rb b/spec/unit/string/certificate_request_spec.rb index 96e1d8837..d0a8288b3 100755 --- a/spec/unit/string/certificate_request_spec.rb +++ b/spec/unit/string/certificate_request_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:certificate_request, '0.0.1') do +describe Puppet::String[:certificate_request, '0.0.1'] do end diff --git a/spec/unit/string/certificate_revocation_list_spec.rb b/spec/unit/string/certificate_revocation_list_spec.rb index cf50471c8..9168fb8ce 100755 --- a/spec/unit/string/certificate_revocation_list_spec.rb +++ b/spec/unit/string/certificate_revocation_list_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:certificate_revocation_list, '0.0.1') do +describe Puppet::String[:certificate_revocation_list, '0.0.1'] do end diff --git a/spec/unit/string/certificate_spec.rb b/spec/unit/string/certificate_spec.rb index 719ee6b06..f6d53688b 100755 --- a/spec/unit/string/certificate_spec.rb +++ b/spec/unit/string/certificate_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:certificate, '0.0.1') do +describe Puppet::String[:certificate, '0.0.1'] do end diff --git a/spec/unit/string/config_spec.rb b/spec/unit/string/config_spec.rb index 562265287..9919fef87 100755 --- a/spec/unit/string/config_spec.rb +++ b/spec/unit/string/config_spec.rb @@ -1,24 +1,24 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:config, '0.0.1') do +describe Puppet::String[:config, '0.0.1'] do it "should use Settings#print_config_options when asked to print" do Puppet.settings.stubs(:puts) Puppet.settings.expects(:print_config_options) subject.print end it "should set 'configprint' to all desired values and call print_config_options when a specific value is provided" do Puppet.settings.stubs(:puts) Puppet.settings.expects(:print_config_options) subject.print("libdir", "ssldir") Puppet.settings[:configprint].should == "libdir,ssldir" end it "should always return nil" do Puppet.settings.stubs(:puts) Puppet.settings.expects(:print_config_options) subject.print("libdir").should be_nil end end diff --git a/spec/unit/string/configurer_spec.rb b/spec/unit/string/configurer_spec.rb index 400bfb593..1b428ef20 100755 --- a/spec/unit/string/configurer_spec.rb +++ b/spec/unit/string/configurer_spec.rb @@ -1,24 +1,24 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') require 'puppet/indirector/catalog/rest' require 'tempfile' -describe Puppet::String.define(:configurer, '0.0.1') do +describe Puppet::String[:configurer, '0.0.1'] do describe "#synchronize" do it "should retrieve and apply a catalog and return a report" do dirname = Dir.mktmpdir("puppetdir") Puppet[:vardir] = dirname Puppet[:confdir] = dirname @catalog = Puppet::Resource::Catalog.new @file = Puppet::Resource.new(:file, File.join(dirname, "tmp_dir_resource"), :parameters => {:ensure => :present}) @catalog.add_resource(@file) Puppet::Resource::Catalog::Rest.any_instance.stubs(:find).returns(@catalog) report = subject.synchronize("foo") report.kind.should == "apply" report.status.should == "changed" end end end diff --git a/spec/unit/string/facts_spec.rb b/spec/unit/string/facts_spec.rb index a537b7420..9b7024724 100755 --- a/spec/unit/string/facts_spec.rb +++ b/spec/unit/string/facts_spec.rb @@ -1,21 +1,21 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:facts, '0.0.1') do +describe Puppet::String[:facts, '0.0.1'] do it "should define an 'upload' fact" do subject.should be_action(:upload) end it "should set its default format to :yaml" do subject.default_format.should == :yaml end describe "when uploading" do it "should set the terminus_class to :facter" it "should set the cach_eclass to :rest" it "should find the current certname" end end diff --git a/spec/unit/string/file_spec.rb b/spec/unit/string/file_spec.rb index bbc8c7e09..f1b9302be 100755 --- a/spec/unit/string/file_spec.rb +++ b/spec/unit/string/file_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:file, '0.0.1') do +describe Puppet::String[:file, '0.0.1'] do end diff --git a/spec/unit/string/key_spec.rb b/spec/unit/string/key_spec.rb index d77f02ec4..fe3532d23 100755 --- a/spec/unit/string/key_spec.rb +++ b/spec/unit/string/key_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:key, '0.0.1') do +describe Puppet::String[:key, '0.0.1'] do end diff --git a/spec/unit/string/node_spec.rb b/spec/unit/string/node_spec.rb index 7198efe76..520cc0f5e 100755 --- a/spec/unit/string/node_spec.rb +++ b/spec/unit/string/node_spec.rb @@ -1,9 +1,9 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:node, '0.0.1') do +describe Puppet::String[:node, '0.0.1'] do it "should set its default format to :yaml" do subject.default_format.should == :yaml end end diff --git a/spec/unit/string/report_spec.rb b/spec/unit/string/report_spec.rb index 51342c2fa..2e206dd06 100755 --- a/spec/unit/string/report_spec.rb +++ b/spec/unit/string/report_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:report, '0.0.1') do +describe Puppet::String[:report, '0.0.1'] do end diff --git a/spec/unit/string/resource_spec.rb b/spec/unit/string/resource_spec.rb index de7e747ed..f4e618616 100755 --- a/spec/unit/string/resource_spec.rb +++ b/spec/unit/string/resource_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:resource, '0.0.1') do +describe Puppet::String[:resource, '0.0.1'] do end diff --git a/spec/unit/string/resource_type_spec.rb b/spec/unit/string/resource_type_spec.rb index 8b0b4aaa7..d12ec00ce 100755 --- a/spec/unit/string/resource_type_spec.rb +++ b/spec/unit/string/resource_type_spec.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper.rb') -describe Puppet::String.define(:resource_type, '0.0.1') do +describe Puppet::String[:resource_type, '0.0.1'] do end