summaryrefslogtreecommitdiff
path: root/tests/white-box/dummy.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-12-09 23:06:19 -0800
committerelijah <elijah@riseup.net>2013-12-09 23:06:19 -0800
commit68328b6e15a38a74261ee46b06091b8e63f85499 (patch)
treedc8328e92113d5ceaa4bbea00048eb8b13f65b80 /tests/white-box/dummy.rb
parente23dc7849d1118ed2dfe7f37a6109ffbeefa959c (diff)
added initial white-box tests for couchdb and webapp nodes
Diffstat (limited to 'tests/white-box/dummy.rb')
-rw-r--r--tests/white-box/dummy.rb44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/white-box/dummy.rb b/tests/white-box/dummy.rb
new file mode 100644
index 00000000..dd343769
--- /dev/null
+++ b/tests/white-box/dummy.rb
@@ -0,0 +1,44 @@
+# only run in the dummy case where there is no hiera.yaml file.
+raise SkipTest unless $node["dummy"]
+
+class Robot
+ def can_shoot_lasers?
+ "OHAI!"
+ end
+
+ def can_fly?
+ "YES!"
+ end
+end
+
+class TestDummy < LeapTest
+ def setup
+ @robot = Robot.new
+ end
+
+ def test_lasers
+ assert_equal "OHAI!", @robot.can_shoot_lasers?
+ pass
+ end
+
+ def test_fly
+ refute_match /^no/i, @robot.can_fly?
+ pass
+ end
+
+ def test_blah
+ fail "blah" #assert false
+ pass
+ end
+
+ def test_01_will_be_skipped
+ skip "test this later"
+ pass
+ end
+
+ def test_err
+ 12/0
+ pass
+ end
+
+end