Skip to content
Behaviour Driven Development for Lua.
Lua Makefile Shell
Branch: master
Clone or download

Latest commit

gvvaughan maint: specl/version.lua is a generated file.
* Makefile (VERSION): 'git' for an unreleased git build!
(lib/specl/version.lua): Add dependency on Makefile to pick up
VERSION changes.
* lib/specl/version.lua: No longer a checked in file on master.
* lib/specl/version-git.lua: A checked in specl.version module for
use with luarocks installations from master.
* .gitignore: Adjust.
* specl-git-1.rockspec (dependencies, source): Set defaults early,
and adjust for git installations in a single block at the end.
(build.modules): Adjust to use pregenerated specl.version.
* spec/specl_spec.yaml (responds to --version): Accept 'git' version
as well as numeric version string.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Latest commit 18bed40 Jan 14, 2018

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin maint: update copyright statements. Jan 4, 2018
build-aux maint: don't install config.ld files with docs. Mar 18, 2018
doc maint: don't install config.ld files with docs. Mar 18, 2018
lib/specl maint: specl/version.lua is a generated file. Mar 18, 2018
spec maint: specl/version.lua is a generated file. Mar 18, 2018
.gitignore maint: specl/version.lua is a generated file. Mar 18, 2018
.luacov sandbox: initialize root sandbox in a new submodule. Mar 27, 2016
.slackid slingshot: sync with upstream, for slack notifications. Aug 17, 2014
.travis.yml travis: upload test coverage reports to codecov.io. Mar 23, 2016
AUTHORS.md configury: be gone! Mar 21, 2016
LICENSE.md maint: update copyright statements. Jan 4, 2018
Makefile maint: specl/version.lua is a generated file. Mar 18, 2018
NEWS.md maint: update copyright statements. Jan 4, 2018
README.md maint: modernize formatting by avoiding string method calls. Jan 7, 2018
TODO.yaml util: don't expose presence of luaposix directly. Apr 3, 2016
specl-git-1.rockspec maint: specl/version.lua is a generated file. Mar 18, 2018
specl.in maint: update copyright statements. Jan 4, 2018

README.md

SPECL

License travis-ci status codecov.io Stories in Ready

Specl is a testing tool for Lua 5.1 (including LuaJit), 5.2 and 5.3, providing a Behaviour Driven Development framework in the vein of RSpec.

  • a rich command line program (the specl command)
  • textual descriptions of examples and groups (spec files use [YAML][])
  • flexible and customizable reporting (formatters)
  • extensible expectation language (matchers)

Installation

There's no need to download a Specl release, or clone the git repo, unless you want to modify the code. If you use LuaRocks, you can use it to install the latest release from its repository:

luarocks install specl

Or from the rockspec inside the release tarball:

luarocks make specl-?-1.rockspec

To install current git master from GitHub (for testing):

luarocks install \
  https://raw.githubusercontent.com/gvvaughan/specl/master/specl-git-1.rockspec

The dependencies are listed in the dependencies entry of the rockspec.

Documentation

Specl includes comprehensive documentation.

Bug reports and code contributions

Please make bug reports and suggestions GitHub Issues. Pull requests are especially appreciated.

But first, please check that your issue has not already been reported by someone else, and that it is not already fixed by master in preparation for the next release (see Installation section above for how to temporarily install master with LuaRocks).

There is no strict coding style, but please bear in mind the following points when proposing changes:

  1. Follow existing code. There are a lot of useful patterns and avoided traps there.

  2. 3-character indentation using SPACES in Lua sources: It makes rogue TABs easier to see, and lines up nicely with 'fi' and 'end' keywords.

  3. Simple strings are easiest to type using single-quote delimiters, saving double-quotes for where a string contains apostrophes.

  4. Save horizontal space by only using SPACEs where the parser requires them.

  5. Use vertical space to separate out compound statements to help the coverage reports discover untested lines.

  6. Prefer explicit string function calls over object methods, to mitigate issues with monkey-patching in caller environments.

You can’t perform that action at this time.