Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 2.03 KB

README.md

File metadata and controls

58 lines (37 loc) · 2.03 KB

Expect

stability-experimental GitHub issues

This extension for Mediawiki adds extended expectations (a kind of assertions) to Lua modules provided by the Scribunto extension. An integral part is to report failures clearly and visible to facilitate interactive and collaborative fault fixing.

Extensive help is available at Expect: Assertion framework for Lua embedded within Mediawiki, with a programmers guide, a reference, and examples.

Usage

Expect depends on modules from the Scribunto extension.

  1. Download from Github (zip) and place the file(s) in a directory called Expect in your extensions/ folder.

  2. Add the following code at the bottom of your LocalSettings.php:

    wfLoadExtension( 'Expect' );
  3. Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Development

Expect uses Mediawiki-Vagrant, and a complete setup can be made quite easily.

  1. Make sure you have Vagrant, etc, prepare a development directory, and move to that directory.

  2. Clone Mediawiki

    git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/vagrant .
  3. Add the role unless #535661 has been merged. (You need git-review to do this.)

    git review -d 535661
  4. Run setup.

    ./setup.sh
  5. Enable role for Expect. This pulls in the role for Scribunto, which then pulls in additional roles.

    vagrant roles enable expect
  6. Start the instance.

    vagrant up
  7. Done.