Skip to content

Commit

Permalink
0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Dec 9, 2012
1 parent 0c0a48d commit 66f7b8d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
14 changes: 14 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (c) 2012 David Chambers <[email protected]>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
12 changes: 9 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ Math.product = (numbers...) ->
Doctests needn't be indented, though there's no harm in being
[Docco-friendly][2].

### Running doctests

To run doctests, pass `doctest` paths to one or more "modules" to be tested.
Each path should be one of the following:
Doctests can be run from the command line or from a browser console: provide
local file system paths in the former case, URLs in the latter. Specifically,
each URL should be one of the following:

- an absolute URL; e.g. "http://example.com/scripts/some-module.js"
- a root-relative URL; e.g. "/scripts/some-module.js"
- a path relative to doctest.js; e.g. "./some-module.js"

This can easily be done from a browser console:
For example:

> doctest("../src/math-extensions.coffee")
retrieving /scripts/lib/../src/math-extensions.coffee...
Expand Down Expand Up @@ -164,6 +168,8 @@ MyApp.utils.bar = function() {

### Dependencies

The following libraries are required to run doctests from a browser console:

- [jQuery][3]
- [Underscore][4]

Expand All @@ -178,4 +184,4 @@ This runs doctest's test suite: first headless, then in a browser.
[1]: http://docs.python.org/library/doctest.html
[2]: http://bit.ly/LanyLq
[3]: http://jquery.com/
[4]: http://documentcloud.github.com/underscore/
[4]: http://underscorejs.org/
2 changes: 1 addition & 1 deletion lib/doctest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
{
"name": "doctest",
"version": "0.3.0",
"version": "0.4.0",
"description": "Quick and dirty doctests for JavaScript and CoffeeScript",
"author": "David Chambers <[email protected]>",
"keywords": ["doctests", "test", "browser"],
"main": "./lib/doctest",
"bin": "./bin/doctest",
"licenses": [{
"type": "WTFPL",
"url": "https://raw.github.com/davidchambers/doctest/master/LICENSE"
}],
"repository": {
"type": "git",
"url": "https://github.com/davidchambers/doctest"
},
"dependencies": {
"coffee-script": "1.4.x",
"underscore": "1.4.x"
Expand Down
2 changes: 1 addition & 1 deletion src/doctest.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ else
CoffeeScript = require 'coffee-script'
module.exports = doctest

doctest.version = '0.3.0'
doctest.version = '0.4.0'

doctest.queue = []

Expand Down

0 comments on commit 66f7b8d

Please sign in to comment.