Skip to content

Latest commit

 

History

History
70 lines (46 loc) · 1.27 KB

quickstart.md

File metadata and controls

70 lines (46 loc) · 1.27 KB

Clojure Quickstart

Requirements

To begin

lein new defshef.blackjack
cd defshef.blackjack

Running

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.

Want tests?

I recommend Expectations.

Install

lein change :dependencies conj '[expectations "2.0.9" :exclusions [org.clojure/clojure]]'
lein change :plugins conj '[lein-expectations "0.0.7"]'

Require

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.

Run tests

On the commandline

lein expectations

In the repl

(expectations/run-all-tests)