• Stars
    star
    1,684
  • Rank 27,715 (Top 0.6 %)
  • Language
    Clojure
  • License
    MIT License
  • Created over 14 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Midje provides a migration path from clojure.test to a more flexible, readable, abstract, and gracious style of testing

Available via clojars

Current Version

License: MIT

About Midje

Midje is a test framework for Clojure. I created it to allow programmers to test with ease, to provide a smooth migration path from clojure.test, to support top-down as well as bottom-up testing, to encourage readable tests, to support a balance between abstraction and concreteness, and to be gracious in its treatment of the people who use it.

Gallery

To make tests more readable, Midje makes them look like examples in Clojure books. Here's how The Joy of Clojure uses syntax to explain Clojure:

Here's the same fact about Clojure in Midje, expressed in a way that's just as readable but also machine-checkable:


While Midje assumes you'll be building a test suite with lasting value, it allows you to do that while still using the repl in an idiomatic way.

Here's the start of a typical Midje repl session:

Midje has loaded the tests and run them for the first time. It's also watching for file changes. When it sees them, it loads the changed files and any dependencies. But notice that you still have a repl prompt. That means you can move rapidly and smoothly among typing at the repl to try out code samples or look up documentation, having your editor send code snippets to the repl to evaluate, and saving source or test files to immediately see what passes or fails:


Midje supplies prepackaged checkers that save you the trouble of writing common code:


And so on.

Learning Midje

Tutorial Tutorial (and sales pitch) for the clojure.test user User guide Mailing list

Other Tools

Contributors

  • Sean T. Allen
  • Alex Baranosky
  • Blake Bassett
  • Noah Bogart
  • Phillip Calçado
  • Toby Crawley
  • Chris Devine
  • dlebrero
  • Dolmio
  • André Eriksson
  • Jason Felice
  • Rafael Ferreira
  • Adam Frey
  • Anders Furseth
  • Stuart Halloway
  • Chris Hapgood
  • Sebastian Hennebrueder
  • Wilkes Joiner
  • Colin Jones
  • Jacek Lach
  • Reed Lipman
  • Ben Mabey
  • Alan Malloy
  • Brian Marick
  • Bob Martin
  • Phillip Mates
  • Paudi Moriarty
  • Dmitri Naumov
  • Alex Nixon
  • Atamert Ölçgen
  • Nick Pascucci
  • Dave Ray
  • Sébastien RoccaSerra
  • Harri Salokorpi
  • Ozan Sener
  • Ben Sinclair
  • Griffin Smith
  • Greg Spurrier
  • Børge Svingen
  • Giorgio Valoti
  • Joseph Wilk

More Repositories

1

structural-typing

Structural typing for Clojure, somewhat inspired by Elm. Tailored to "flow-style" programming, where complex structures flow through a series of functions, each of which makes a smallish change. Can also be used in testing tools and the like that need to describe how a nested structure differs from a description.
Clojure
246
star
2

fp-oo

Code samples and exercise solutions for /Functional Programming for the Object-Oriented Programmer/
Clojure
143
star
3

growing-oo-software-in-ruby

Ruby Translation of Freeman & Pryce /Growing Object-Oriented Software, Guided by Tests/
Ruby
132
star
4

lein-midje

Leiningen plugin for Midje
Clojure
77
star
5

suchwow

Functions and behaviors not present in Clojure core. Support for creating and using your own "favorite functions" namespace. Better docstrings for clojure.core functions. More expansive versions of clojure.core functions.
Clojure
63
star
6

peano

Using logic programming (Clojure's core.logic) for test data manipulation and generation
Clojure
59
star
7

purescript-lenses

Supporting code for the book /Lenses for the Mere Mortal: PureScript Edition/
PureScript
32
star
8

stunted

Code to support using functional style in Ruby
Ruby
31
star
9

static-fp

Materials for /An Outsider's Guide to Statically Typed Functional Programming/
Elm
26
star
10

rubactive

A sketch of reactive programming for Ruby
Ruby
25
star
11

pre-commit-hooks

Various git pre-commit or pre-push hooks using http://pre-commit.com/
Ruby
11
star
12

specter-book-code

Source and tests for Extending and Using Specter
Clojure
11
star
13

eecrit

Elixir/Elm version of Critter4Us
JavaScript
10
star
14

enlive-tutorial

Showing ways to use Enlive
Clojure
9
star
15

patterned

Provides `defpatterned` to define functions that pattern-match on their args
Clojure
7
star
16

critter4us

Animal reservation system
Objective-J
7
star
17

flow_assertions

Flow-style assertions for Elixir, Ecto, and Phoenix
Elixir
7
star
18

crit19

A teaching animal scheduling app
Elixir
7
star
19

Midje-quickstart

Annotated (tutorialized) projects to help you get started with Midje
Clojure
7
star
20

refactoring-examples

Examples of medium-scale refactorings
Ruby
6
star
21

ecto_test_dsl

A domain-specific testing library for testing code that uses Elixir's Ecto. Supports different Phoenix workflows.
Elixir
5
star
22

clojure-commons

Mostly the "favorite functions" namespace I `use` everywhere. That contains functions I wish were in `clojure.core`.
Clojure
4
star
23

ecto_flow_assertions

Flow-style assertions for use with Ecto (mainly about changesets)
Elixir
3
star
24

arxta

Static source for arxta
HTML
3
star
25

ecto_test_data_builder

Use this code to build your own Elixir module that helps build Ecto test data.
Elixir
2
star
26

Midje-videos

videos for midje, to save bandwidth on main project
2
star
27

elm-lens

A lens library for Elm, based on the one built in /An Outsider's Guide to Statically Typed Functional Programming/
1
star
28

mockery_extras

Helper code and documentation for Mockery
Elixir
1
star
29

.emacs.d

Emacs Lisp
1
star
30

midje-comparisons

Comparison functions as used in Midje, including descriptive false comparisons.
Clojure
1
star
31

stations

Scheduling exam stations for vet students
Ruby
1
star
32

dsl_dashboard

Experimenting with a Phoenix "IDE" for ecto_test_dsl
Elixir
1
star