summaryrefslogtreecommitdiff
path: root/test/example.bats
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2019-09-07 13:37:58 -0600
committermo khan <mo@mokhan.ca>2019-09-07 13:37:58 -0600
commit091ef37ff36cfa0a67a6cf4e6356d362320a8c07 (patch)
tree5909591710be021e23c5fb1064e145f1d72172b3 /test/example.bats
parent07454039c7ed4384a679325e9cd75c1faaceb43d (diff)
rename example spec
Diffstat (limited to 'test/example.bats')
-rw-r--r--test/example.bats20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/example.bats b/test/example.bats
new file mode 100644
index 0000000..5acd1ad
--- /dev/null
+++ b/test/example.bats
@@ -0,0 +1,20 @@
+#!/usr/bin/env bats
+
+load test_helper
+
+@test "testing" {
+ result="$(echo 2+2 | bc)"
+ [ "$result" -eq 4 ]
+}
+
+@test "is successfull" {
+ run echo 'hello'
+
+ assert_success $'hello'
+}
+
+@test "produces an error" {
+ run rm blah
+
+ assert_failure $'rm: blah: No such file or directory'
+}