lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Behaviour Driven Development for Lua

I am happy to announce the release of Specl release 6.

Specl's home page is at

* Noteworthy changes in release 6 (2013-05-09) [stable]

** This release is a significant upgrade, with many new features,
   and, no doubt, some new bugs.

** New features:

  - Top level 'before' and 'after' functions are supported.

  - A proper, documented, API for adding custom matchers.

  - A new 'any_of' method for any matcher:

     expect (ctermid ()).should_match.any_of {"/.*tty.*", "/.*pts.*"}

  - You can `require ""` from a spec file (usually in the
    initial top-level `before`) to get access to a shell Command
    constructor, a `spawn` executor function and several new matchers
    for querying the status of a shell command.

  - `package.path` is augmented, for the duration of each spec file,
    so that `require` can find and load other Lua files in the same

  - Additional YAML "documents" from a spec file with '---' and '...'
    stream separators are no longer ignored; but treated as additional
    unnamed documents.

  - Report formatter displays inline expectation summaries for each
    example when not in verbose mode.

** Incompatible changes:

  - Documentation is now in Jekyll format markdown for easy website

  - Calling require in a spec file now runs in the local environment,
    giving access to 'global' symbols from the newly loaded file from
    the local namespace.  Conversely, access to those same symbols is
    no longer available from "_G", the global environment table.

Install it with LuaRocks, using:

  luarocks install specl-6

Until the rocks are available from the official repository in a few days,
you can install directly from the specl release branch, with:

  $ luarocks install \