CrossClj

1.9.2-alpha4 docs

SourceDocs



RECENT

    midje

    Clojars

    Jun 22, 2018


    OWNER
    Brian Marick
    Exampler Consulting
    Champaign, IL USA
    marick@exampler.com
    www.exampler.com

    Readme

    Index of all namespaces


    « Project + dependencies

    A TDD library for Clojure that supports top-down ('mockish') TDD, encourages readable tests, provides a smooth migration path from clojure.test, balances abstraction and concreteness, and strives for graciousness.

    midje.checkersDocsSource
    Checkers are for checking results of checkables, or checking
    that appropriate arguments are passed to prerequisites
    midje.data.metaconstantDocsSource
    A notation that avoids confusion between what’s essential
    about data and what’s accidental. A stand in for constant data.
    midje.data.nested-factsDocsSource
    During checking of a fact, this contains pointers to the facts that contain it,
    in outer-to-inner order. The fact itself is the last of the sequence.
    midje.emission.clojure-test-facadeDocsSource
    Midje makes use of clojure.test for its reporting. This
    facade shows how.
    midje.emission.colorizeDocsSource
    Functions dealing with making various forms of
    Midje output be ergonomically colorful.
    midje.emission.plugins.junit.with-defaultDocsSource
    JUnit formatter for Midje that keeps original stdout output.
    
    midje.emission.plugins.silenceDocsSource
    A template for emission maps that emit nothing.
    
    midje.emission.utilDocsSource
    Utility functions dealing with checking or tranforming forms.
    
    midje.open-protocolsDocsSource
    Macros for using protocols in prerequisites.
    
    The strategy for open protocols is to rewrite each function defined in the
    deftype/defrecord so that it checks whether its corresponding symbol is
    currently faked out. If so, it uses that function definition instead of
    continuing on with its own implementation.
    midje.parsing.0-to-fact-form.generativeDocsSource
    Check multiple facts given clojure.check generated values, failing values are shrunk before being shown.
    
    midje.parsing.0-to-fact-form.tabularDocsSource
    A way to create multiple facts with the same template, but different data points.
    
    midje.parsing.1-to-explicit-form.metaconstantsDocsSource
    Transforming code in a way that produces metaconstants
    
    midje.parsing.arrow-symbolsDocsSource
    Lexicon of all Midje arrows. Arrows are used in both the sweet and expanded forms.
    
    midje.parsing.expanded-symbolsDocsSource
    Lexicon of all symbols at the head of expanded forms.
    
    midje.parsing.util.fnrefDocsSource
    A fnref is the first symbol-or-var in a list. These utilities
    allow you to interpret it in multiple ways.
    midje.replDocsSource
    Functions useful when using Midje in the repl or from the command line.
    See midje-repl-help for details.

    VARS

    - & =>

    A add-midje-fact-symbols after against-background all-keyword-is-not-a-filter and-update-defaults! antiterminologicaldisintactitudinarian-fact antiterminologicaldisintactitudinarian-facts antiterminologicaldisintactitudinarian-formula anything around as-checker autotest autotest-default-dirs autotest-options autotest-options-atom

    B background before

    C =contains=> chatty-checker check-facts check-facts-once-given check-one-fact checker complained-about-missing-on-filesystem? contains

    D =deny=> deduce-user-intention deduce-user-intention-for-disk-command deduce-user-intention-for-memory-command def-obedient-function default-args default-as-needed defaulting-args defchecker do-to-all?

    E =expands-to=> eight-of every-checker exactly exists-on-filesystem?

    F =future=> fact fact-description fact-file fact-group fact-guid fact-line fact-name fact-namespace fact-source fact-top-level? facts FALSEY falsey fetch-facts fetch-intended-facts five-of forget-certain-namespaces! forget-facts formula four-of future-fact future-facts future-formula

    G guide

    H has has-prefix has-suffix

    I *include-midje-checks* incipient-fact incipient-facts incipient-formula include-midje-checks irrelevant

    J just

    L last-fact-checked load-facts

    M *me metaconstants midje midje-arrows midje-checkers midje-configuration midje-defining-checkers midje-fact midje-facts midje-prerequisites midje-print-level midje-print-levels midje-repl midje-setup midje-teardown

    N =not=> n-of namespace-state-changes namespace-stream-checker nine-of

    O on-require-failure one-of

    P pending-fact pending-facts pending-formula provided

    R rcf recheck-fact roughly

    S =streams=> set-autotest-option! seven-of six-of some-checker source-of-last-fact-checked

    T =test=> =throw-parse-exception=> =throws=> tabular ten-of three-of throws TRUTHY truthy two-of

    U unfinished unloaded? update-one-default!

    W with-state-changes without-updating-defaults

    midje.shape-checkersDocsSource
    Checkers that use structural-typing
    
    midje.utilDocsSource
    Utility code for testing private vars.
    
    midje.util.debuggingDocsSource
    Functions for printing indented output for use in debugging.
    
    midje.util.lazinessDocsSource
    To evaluate a fact it needs to be eagerly evaluated.
    

    VARS

    eagerly

    midje.util.ordered-commonDocsSource
    This code was copied from an earlier version of the ordered library,
    https://github.com/flatland/ordered, because of a version conflict.
    That library is covered by the Eclipse Public License, V1.0, which
    you can find in Midje's root directory.
    midje.util.ordered-deftypeDocsSource
    This code was copied from an earlier version of the ordered library,
    https://github.com/flatland/ordered, because of a version conflict.
    That library is covered by the Eclipse Public License, V1.0, which
    you can find in Midje's root directory.
    midje.util.ordered-mapDocsSource
    This code was copied from an earlier version of the ordered library,
    https://github.com/flatland/ordered, because of a version conflict.
    That library is covered by the Eclipse Public License, V1.0, which
    you can find in Midje's root directory.
    midje.util.ordered-setDocsSource
    This code was copied from an earlier version of the ordered library,
    https://github.com/flatland/ordered, because of a version conflict.
    That library is covered by the Eclipse Public License, V1.0, which
    you can find in Midje's root directory.
    midje.util.unifyDocsSource
    Unification is used in tabular and (against-)background code.
    
    The README below is fetched from the published project artifact. Some relative links may be broken.

    Available via clojars

    Stable version:

    [midje "1.9.1"]
    

    Experimental version:

    [midje "1.9.2-alpha3"]
    

    License: MIT

    Build Status

    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:

    ![](https://raw.github.com/marick/midje-clojure-test-tutorial/master/images/other/truthy.jpg)

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

    ![](https://raw.github.com/marick/midje-clojure-test-tutorial/master/images/other/truthy-fact.jpg)


    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:

    ![](https://raw.github.com/marick/midje-clojure-test-tutorial/master/images/plain/3.jpg)

    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:

    ![](https://raw.github.com/marick/midje-clojure-test-tutorial/master/images/plain/5.jpg)


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

    ![](https://raw.github.com/marick/midje-clojure-test-tutorial/master/images/other/checkers.jpg)


    And so on.

    Learning Midje

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

    Other Tools

    Contributors

    • Sean T. Allen
    • Alex Baranosky
    • Blake Bassett
    • Phillip Calçado
    • Toby Crawley
    • Chris Devine
    • dlebrero
    • Dolmio
    • André Eriksson
    • Jason Felice
    • 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