summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-05-30 06:14:35 +0000
committerLuke Kanies <luke@madstop.com>2005-05-30 06:14:35 +0000
commitcdfdfb9d1bbfb9c5a93acdfcb97e61d92a28e3b6 (patch)
tree88c6908bf912e8821678ed582a0badf750afc0a7
parentd42efbeb2b2772d8286756a2aedb40604a1b7f11 (diff)
downloadpuppet-cdfdfb9d1bbfb9c5a93acdfcb97e61d92a28e3b6.tar.gz
puppet-cdfdfb9d1bbfb9c5a93acdfcb97e61d92a28e3b6.tar.xz
puppet-cdfdfb9d1bbfb9c5a93acdfcb97e61d92a28e3b6.zip
adding some more tests for Blink::Type
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@285 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--lib/blink/type.rb3
-rw-r--r--test/types/tc_type.rb16
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/blink/type.rb b/lib/blink/type.rb
index 57b9e0f3f..f603c5e24 100644
--- a/lib/blink/type.rb
+++ b/lib/blink/type.rb
@@ -42,6 +42,9 @@ class Blink::Type < Blink::Element
@name = :blink # a little fakery, since Blink itself isn't a type
@namevar = :notused
+ @states = []
+ @parameters = [:notused]
+
@allowedmethods = [:noop,:debug]
@@metaparams = [
diff --git a/test/types/tc_type.rb b/test/types/tc_type.rb
index 9cfb1f421..cd36a4ec0 100644
--- a/test/types/tc_type.rb
+++ b/test/types/tc_type.rb
@@ -11,6 +11,10 @@ require 'test/unit'
class TestType < Test::Unit::TestCase
def test_typemethods
+ assert_nothing_raised() {
+ Blink::Type.buildstatehash
+ }
+
Blink::Type.eachtype { |type|
name = nil
assert_nothing_raised() {
@@ -29,6 +33,18 @@ class TestType < Test::Unit::TestCase
assert(
type.namevar
)
+
+ assert_not_nil(
+ type.states
+ )
+
+ assert_not_nil(
+ type.validstates
+ )
+
+ assert(
+ type.validparameter(type.namevar)
+ )
}
end
end