lein spec -a
(ns framework.core-spec (:require [speclj.core :refer :all] [framework.core :refer :all]))
(context "All Tests" (before-all (println "Start Testing")) (after-all (println "Finished Testing")) (describe "Speclj 'Should' Assertions:" (describe "Truthiness and Falsiness:" (it "true evaluates to true" (should true)) (it "false evaluates to false" (should-not false))) (describe "Nilness:" (it "nil is evaluated as nil" (should-be-nil nil))) (describe "Equality:" (it "six equals six" (should= 6 (+ 2 4))) (it "six doesn't equal seven" (should-not= 6 (+ 3 4)))) (describe "Tests that should fail:" (it "true equals false" (should false)) (it "Force the test to fail with should-fail" (should-fail "failed because should-fail ALWAYS fails a test")) (it "Force a failure in a different way" (-fail "failed by calling -fail, a custom assertion")) (it "fails because the exception has the wrong message" (should-throw ArithmeticException "Foo" (/ 1 0)))) (describe "Throwing Exceptions:" (it "throws an ArithmeticException because division by zero" (should-throw ArithmeticException (/ 1 0))) (it "doesn't throw an ArithmeticException when properly formed" (should-not-throw (= 1 1)))) (describe "Fuzzy Equality:" (it "'11' is the same as '11.0'" (should== 11 11.0))) (describe "Demonstration of 'pending':" (it "using function 'pending'" (pending "Pending message goes here") (should= 1 1)) (xit "using 'xit' instead of 'it' to implement 'pending':" (should= 1 1)))) (describe "Bifrost Testing" (describe "Pinging:" (it "pings correctly" (should= 1 1))) (describe "Response:" (it "gets something back from the server" (should= 1 1)))))
(run-specs)
On Feb 24, 2016, at 2:29 PM, ben.n...@cenx.com wrote:
Also, I should point out that the report comes out as "Start Testing.....FFFF...**..Finished Testing" instead of the original, which verbose, and had the names of all of the describe and it strings. The new report is appended with Failures: and Pending: as the original did, but is appended also with "Subprocess failed", but without a mention of *which* subprocess
--
You received this message because you are subscribed to the Google Groups "speclj" group.
To unsubscribe from this group and stop receiving emails from it, send an email to speclj+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.