diff options
| author | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-24 09:25:33 -0700 |
|---|---|---|
| committer | Pieter van de Bruggen <pieter@puppetlabs.com> | 2011-03-25 08:59:08 -0700 |
| commit | 78371a739bcf1b1d76496e9038fa4b076a27032f (patch) | |
| tree | a68cf44c603f4e90f520b3805547a0858a3b634f /spec/unit/interface | |
| parent | 53b0656048c3227048bdc317c5e917ad0c39e850 (diff) | |
| download | puppet-78371a739bcf1b1d76496e9038fa4b076a27032f.tar.gz puppet-78371a739bcf1b1d76496e9038fa4b076a27032f.tar.xz puppet-78371a739bcf1b1d76496e9038fa4b076a27032f.zip | |
(#6770) Refactor Puppet::Interface#initialize.
P::I#initialize now takes a name and a version (and an optional block). The
options hash has been removed, though it may be reintroduced if a legitimate
use case can be made for it (so far, it's only been used for the version
number).
Reviewed-By: Jacob Helwig
Diffstat (limited to 'spec/unit/interface')
| -rw-r--r-- | spec/unit/interface/action_builder_spec.rb | 2 | ||||
| -rw-r--r-- | spec/unit/interface/action_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/indirector_spec.rb | 4 | ||||
| -rw-r--r-- | spec/unit/interface/interface_collection_spec.rb | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/interface/action_builder_spec.rb b/spec/unit/interface/action_builder_spec.rb index 2c2f3b14c..27e817fe9 100644 --- a/spec/unit/interface/action_builder_spec.rb +++ b/spec/unit/interface/action_builder_spec.rb @@ -13,7 +13,7 @@ describe Puppet::Interface::ActionBuilder do end it "should define a method on the interface which invokes the action" do - interface = Puppet::Interface.new(:action_builder_test_interface, :version => '0.0.1') + interface = Puppet::Interface.new(:action_builder_test_interface, '0.0.1') action = Puppet::Interface::ActionBuilder.build(interface, :foo) do invoke do "invoked the method" diff --git a/spec/unit/interface/action_spec.rb b/spec/unit/interface/action_spec.rb index 246ae9622..292caabb9 100644 --- a/spec/unit/interface/action_spec.rb +++ b/spec/unit/interface/action_spec.rb @@ -24,7 +24,7 @@ describe Puppet::Interface::Action do describe "when invoking" do it "should be able to call other actions on the same object" do - interface = Puppet::Interface.new(:my_interface, :version => '0.0.1') do + interface = Puppet::Interface.new(:my_interface, '0.0.1') do action(:foo) do invoke { 25 } end @@ -56,7 +56,7 @@ describe Puppet::Interface::Action do end end - interface = Puppet::Interface::MyInterfaceBaseClass.new(:my_inherited_interface, :version => '0.0.1') do + interface = Puppet::Interface::MyInterfaceBaseClass.new(:my_inherited_interface, '0.0.1') do action(:baz) do invoke { "the value of foo in baz is '#{foo}'" } end diff --git a/spec/unit/interface/indirector_spec.rb b/spec/unit/interface/indirector_spec.rb index b14058eca..4b2beaefc 100644 --- a/spec/unit/interface/indirector_spec.rb +++ b/spec/unit/interface/indirector_spec.rb @@ -5,7 +5,7 @@ require 'puppet/interface/indirector' describe Puppet::Interface::Indirector do before do - @instance = Puppet::Interface::Indirector.new(:test, :version => '0.0.1') + @instance = Puppet::Interface::Indirector.new(:test, '0.0.1') @indirection = stub 'indirection', :name => :stub_indirection @@ -24,7 +24,7 @@ describe Puppet::Interface::Indirector do it "should be able to determine its indirection" do # Loading actions here an get, um, complicated Puppet::Interface.stubs(:load_actions) - Puppet::Interface::Indirector.new(:catalog, :version => '0.0.1').indirection.should equal(Puppet::Resource::Catalog.indirection) + Puppet::Interface::Indirector.new(:catalog, '0.0.1').indirection.should equal(Puppet::Resource::Catalog.indirection) end end diff --git a/spec/unit/interface/interface_collection_spec.rb b/spec/unit/interface/interface_collection_spec.rb index 193d31b1e..a404d85a6 100644 --- a/spec/unit/interface/interface_collection_spec.rb +++ b/spec/unit/interface/interface_collection_spec.rb @@ -67,7 +67,7 @@ describe Puppet::Interface::InterfaceCollection do describe "::register" do it "should store the interface by name" do - interface = Puppet::Interface.new(:my_interface, :version => '0.0.1') + interface = Puppet::Interface.new(:my_interface, '0.0.1') subject.register(interface) subject.instance_variable_get("@interfaces").should == {:my_interface => {'0.0.1' => interface}} end |
