[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 13c463a 050/340: Add more extensive usage instru
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 13c463a 050/340: Add more extensive usage instructions to the README. |
Date: |
Thu, 16 Dec 2021 14:59:02 -0500 (EST) |
branch: elpa/buttercup
commit 13c463aca1b45f1eeb64607177386837f3272858
Author: Jorgen Schaefer <contact@jorgenschaefer.de>
Commit: Jorgen Schaefer <contact@jorgenschaefer.de>
Add more extensive usage instructions to the README.
Fixes #8
---
README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/README.md b/README.md
index 50ff056..aa79d38 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,72 @@ All code in this file can be run by Buttercup’s built-in
markdown test
runner. Just use `make test` in the project directory to see the
output.
+## Getting Started
+
+You can install buttercup from
+[MELPA Stable](http://stable.melpa.org/). Add the following to your
+`init.el` or `.emacs` file:
+
+```
+(require 'package)
+(add-to-list 'package-archives
+ '("melpa-stable" . "http://stable.melpa.org/packages/") t)
+```
+
+This should allow you to `M-x package-install RET buttercup RET`.
+Afterwards, in an otherwise empty directory, create a file called
+`some-test.el` with the following contents:
+
+```Lisp
+(describe "A suite"
+ (it "contains a spec with an expectation"
+ (expect t :to-be t)))
+```
+
+You can now use buttercup to run this test:
+
+```
+$ emacs -batch -f package-initialize -l buttercup -f buttercup-run-discover
+A suite
+ contains a spec with an expectation
+```
+
+Congratulations, you just ran your first tests!
+
+## Full Project Example
+
+Tests should be run in an environment separate from your interactive
+Emacs. To get such an environment and install packages into it, you
+can use [Cask](https://github.com/cask/cask). For installation
+instructions see there.
+
+In the directory from above, create a new file called `Cask` with the
+following contents:
+
+```
+(source gnu)
+(source melpa-stable)
+
+(development
+ (depends-on "buttercup"))
+```
+
+Now you can tell cask to download and install the depended-on packages
+in the environment of the current directory:
+
+```
+$ cask install
+```
+
+You only need to do this once. Subsequently, you can run buttercup
+tests simply by invoking buttercup using cask:
+
+```
+$ cask exec buttercup
+A suite
+ contains a spec with an expectation
+```
+
## Suites: `describe` Your Tests
A test suite begins with a call to the Buttercup macro `describe` with
- [nongnu] elpa/buttercup c1abc2a 033/340: Refactoring of spy context accessors., (continued)
- [nongnu] elpa/buttercup c1abc2a 033/340: Refactoring of spy context accessors., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f314737 035/340: ROADMAP.md: Remove spies section, as it is done., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4bd24e7 037/340: ROADMAP cleanup., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 55b87ec 039/340: Removed ROADMAP.md. This is now tracked in issues., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 993ddda 040/340: Add .gitignore, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1dcd2cd 041/340: Prepare release, add bumpversion and pkg.el, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f046eef 042/340: Bump version: 0.1 → 1.0, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 537b729 044/340: Merge pull request #6 from myeffort/master, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bcaa087 046/340: Add buttercup executable to run buttercup tests more easily., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 7250873 047/340: Rename patch to minor in bumpversion.cfg, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 13c463a 050/340: Add more extensive usage instructions to the README.,
ELPA Syncer <=
- [nongnu] elpa/buttercup c783259 052/340: Add MELPA Stable badge., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bdc3721 056/340: Documentation for the buttercup-reporter variable., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 329d2f9 051/340: Add autoload markers to test runners., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 162b862 060/340: The buttercup--funcall function., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 638a836 061/340: The batch reporter now displays failures and stack traces., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c61a69a 066/340: A rudimentary interactive reporter., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 182a974 068/340: Pending specs and disabled suites., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b3bb12a 070/340: buttercup-run-discover: Fix regexp., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 26f8117 071/340: Rename buttercup-test.el and move it to the right directory., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f593486 092/340: Use pattern _ not t in pcase, as t is deprecated, ELPA Syncer, 2021/12/16