Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
pronounced "speckle": a TDD/BDD framework for Clojure.
Clojure Other

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.idea
examples
spec/speclj
src
.gitignore
LICENSE
README.md
project.clj
speclj.iml

README.md

speclj

(pronounced "speckle" [spek-uhl])

It's a TDD/BDD framework for Clojure. Based quite loyally on RSpec.

Installation

TODO

Usage

Speclj 101

Checkout this example. Below we'll look at it piece by piece.

(ns basics-spec
  (:use [speclj.core]))

(describe "Truth"

  (it "is true"
    (should true))

  (it "is not false"
    (should-not false)))

(run-specs)

speclj.core namespace

Your spec files should :use the speclj.core in it's entirety. It's a clean namespace and you're likely going to use all the definitions within it.

(:use [speclj.core])

describe

describe is the outer most container for specs. It takes a String name and any number of spec components.

(describe "Truth" ...)

it

it specifies a characteristic of the subject. This is where assertions go. Be sure to provide good names as the first parameter of it calls.

(it "is true" ...)

should and should-not

Assertions. All assertions begin with should. should and should-not are just two of the many matchers available. They both take expressions that they will check for truthy-ness and falsy-ness respectively.

(should ...)
(should-not ...)

What's that thing at the end?

At the very end of the file is an invocation of (run-specs). This is a benign call that will execute all the specs if the file is evaluated in isolation. It provides a convenience that editors and IDEs don't provide yet for speclj.

(run-specs)

Contributing

Clone the master branch, build, and run all the tests:

git clone https://github.com/slagyr/speclj.git
cd speclj
lein javac
lein spec

Make patches and submit them along with an issue (see below).

Issues

Post issues on the speclj github project:

License

Copyright (C) 2010 Micah Martin All Rights Reserved.

Distributed under the The MIT License.

Something went wrong with that request. Please try again.