- JRE 1.8
- leiningen
lein new defshef.blackjack
cd defshef.blackjack
We'll use the repl to interact easily with the application
lein repl
You'll then be greeted with a user=>
prompt.
user=> (use 'defshef.blackjack :reload)
nil
You can now run functions that you've defined in src/defshef/blackjack.clj
. Whenever you re-run that (use)
line, your latest code will be loaded in.
I recommend Expectations.
lein change :dependencies conj '[expectations "2.0.9" :exclusions [org.clojure/clojure]]'
lein change :plugins conj '[lein-expectations "0.0.7"]'
Add the require to your namespace declaration
(ns defshef.blackjack
(:require [expectations :refer :all]))
You can now write tests alongside your code as shown in the expectations docs.
On the commandline
lein expectations
In the repl
(expectations/run-all-tests)