summaryrefslogtreecommitdiffstats
path: root/spec/unit/interface_spec.rb
diff options
context:
space:
mode:
authorPieter van de Bruggen <pieter@puppetlabs.com>2011-03-24 18:55:32 -0700
committerPieter van de Bruggen <pieter@puppetlabs.com>2011-03-25 08:59:08 -0700
commit6aea116701b8e03558ef7a5a15766b267af14281 (patch)
tree1ca02494756c402321e84e9df2f327beb0b78bcb /spec/unit/interface_spec.rb
parent1af9bb232ed73f16789f465e89a0d498c39e1b78 (diff)
downloadpuppet-6aea116701b8e03558ef7a5a15766b267af14281.tar.gz
puppet-6aea116701b8e03558ef7a5a15766b267af14281.tar.xz
puppet-6aea116701b8e03558ef7a5a15766b267af14281.zip
(#6770) Add support for version :latest.
Specifying a version of `:latest` will find the most recent version of the named interface installed in your RUBYLIB, and attempt to load that. This is unlikely to provide a stable dependency in the future, so should be used sparingly, acknowledging the dangers. Reviewed-By: Daniel Pittman
Diffstat (limited to 'spec/unit/interface_spec.rb')
-rwxr-xr-xspec/unit/interface_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/unit/interface_spec.rb b/spec/unit/interface_spec.rb
index 060a71fb8..cf7d209da 100755
--- a/spec/unit/interface_spec.rb
+++ b/spec/unit/interface_spec.rb
@@ -36,6 +36,10 @@ describe Puppet::Interface do
proc { Puppet::Interface.new(:no_version) }.should raise_error(ArgumentError)
end
+ it "should require a valid version number" do
+ proc { Puppet::Interface.new(:bad_version, 'Rasins') }.should raise_error(ArgumentError)
+ end
+
it "should instance-eval any provided block" do
face = Puppet::Interface.new(:interface_test_block,'0.0.1') do
action(:something) do