Own JS/CSS options

Tuesday, March 29, 2016

Buttercup 1.5 released

I just released version 1.5 of Buttercup, the Behavior-Driven Emacs Lisp Testing framework.

Buttercup is a behavior-driven development framework for testing Emacs Lisp code. It is heavily inspired by Jasmine.

Installation and Use

Buttercup is available from MELPA Stable.

Example test suite:

(describe "A suite"
  (it "contains a spec with an expectation"
    (expect t :to-be t)))

Suites group tests, and suites can be nested. Contrary to ERT, suites can share set-up and tear-down code for tests, and Buttercup comes with built-in support for mocks in the form of spies. See the package homepage above for a full description of the syntax for test suites and specs.

Buttercup comes with a shell script to run the default discover runner. If used together with cask, cask exec buttercup will find, load and run test suites in your project.

Changes Since 1.4

  • The new assume form makes it easier to skip tests when certain assumptions do not hold (thanks to Sebastian Wiesner for the patch!)
  • Buttercup is now available in Debian 9 and Ubuntu 16.10 or later: apt-get install elpa-buttercup (thanks to Sean Whitton!)
  • The describe form now also takes a :var argument to make variables available in the body, removing one level of nesting compared to a let
  • Pending specs are now tracked separately, making test run reports more easily readable
  • And a number bug fixes