summaryrefslogtreecommitdiffstats
path: root/spec/unit/interface_spec.rb
diff options
context:
space:
mode:
authorPieter van de Bruggen <pieter@puppetlabs.com>2011-03-23 16:10:45 -0700
committerPieter van de Bruggen <pieter@puppetlabs.com>2011-03-23 16:10:45 -0700
commit7aa8f2252c7b0512c929fb87a6c3a09a952a142a (patch)
tree0e65699d002c28ba0abacfaf41b693519fc2ef6f /spec/unit/interface_spec.rb
parent1187a0eb2550f04d9b6c3dcfdcacdfbb32de0e56 (diff)
downloadpuppet-7aa8f2252c7b0512c929fb87a6c3a09a952a142a.tar.gz
puppet-7aa8f2252c7b0512c929fb87a6c3a09a952a142a.tar.xz
puppet-7aa8f2252c7b0512c929fb87a6c3a09a952a142a.zip
(#6770) Changing versioning to semver.
More information about the versioning scheme can be found at http://semver.org. Paired-With: Nick Lewis
Diffstat (limited to 'spec/unit/interface_spec.rb')
-rwxr-xr-xspec/unit/interface_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index b78a9f8c8..eaeb4c4ce 100755
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -17,13 +17,13 @@ describe Puppet::Interface do
describe "#interface" do
it "should register the interface" do
- interface = Puppet::Interface.interface(:interface_test_register, 1)
- interface.should == Puppet::Interface.interface(:interface_test_register, 1)
+ interface = Puppet::Interface.interface(:interface_test_register, '0.0.1')
+ interface.should == Puppet::Interface.interface(:interface_test_register, '0.0.1')
end
it "should load actions" do
Puppet::Interface.any_instance.expects(:load_actions)
- Puppet::Interface.interface(:interface_test_load_actions, 1)
+ Puppet::Interface.interface(:interface_test_load_actions, '0.0.1')
end
it "should require a version number" do
@@ -37,7 +37,7 @@ describe Puppet::Interface do
end
it "should instance-eval any provided block" do
- face = Puppet::Interface.new(:interface_test_block, :version => 1) do
+ face = Puppet::Interface.new(:interface_test_block, :version => '0.0.1') do
action(:something) do
invoke { "foo" }
end
@@ -48,21 +48,21 @@ describe Puppet::Interface do
end
it "should have a name" do
- Puppet::Interface.new(:me, :version => 1).name.should == :me
+ Puppet::Interface.new(:me, :version => '0.0.1').name.should == :me
end
it "should stringify with its own name" do
- Puppet::Interface.new(:me, :version => 1).to_s.should =~ /\bme\b/
+ Puppet::Interface.new(:me, :version => '0.0.1').to_s.should =~ /\bme\b/
end
it "should allow overriding of the default format" do
- face = Puppet::Interface.new(:me, :version => 1)
+ face = Puppet::Interface.new(:me, :version => '0.0.1')
face.set_default_format :foo
face.default_format.should == :foo
end
it "should default to :pson for its format" do
- Puppet::Interface.new(:me, :version => 1).default_format.should == :pson
+ Puppet::Interface.new(:me, :version => '0.0.1').default_format.should == :pson
end
# Why?
@@ -75,8 +75,8 @@ describe Puppet::Interface do
end
it "should try to require interfaces that are not known" do
- Puppet::Interface::InterfaceCollection.expects(:require).with "puppet/interface/v1/foo"
- Puppet::Interface.interface(:foo, 1)
+ Puppet::Interface::InterfaceCollection.expects(:require).with "puppet/interface/v0.0.1/foo"
+ Puppet::Interface.interface(:foo, '0.0.1')
end
it "should be able to load all actions in all search paths"