summaryrefslogtreecommitdiff
path: root/tests/dummy.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-11-25 00:42:46 -0800
committerelijah <elijah@riseup.net>2013-12-05 15:59:02 -0800
commitb3542ab1f8a80e5674bbf367f3345a71f30cd0db (patch)
tree577d8d021ea3d11908ddfb42661634a89b791f82 /tests/dummy.rb
parent79c97caa49ca43585fa638f1aa32cacbd94d06f0 (diff)
initial test framework
Diffstat (limited to 'tests/dummy.rb')
-rw-r--r--tests/dummy.rb44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/dummy.rb b/tests/dummy.rb
new file mode 100644
index 00000000..e7964a6c
--- /dev/null
+++ b/tests/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
+ assert false
+ pass
+ end
+
+ def test_that_will_be_skipped
+ skip "test this later"
+ pass
+ end
+
+ def test_err
+ 12/0
+ pass
+ end
+
+end