Skip to content

Commit

Permalink
Merge pull request #23 from molovo/version-0.4.x
Browse files Browse the repository at this point in the history
v0.4.0
  • Loading branch information
James Dinsdale authored Feb 13, 2017
2 parents 7f4601c + fb9f7bf commit 84330d4
Show file tree
Hide file tree
Showing 4 changed files with 237 additions and 53 deletions.
19 changes: 6 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
env: ZSH_SRC=system
- os: osx
env: ZSH_SRC=homebrew
addons:
apt:
packages:
zsh
before_script:
- if [[ "$ZSH_SRC" == "homebrew" ]]; then brew install zsh; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install zsh; fi
- mkdir .bin
- sudo curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > .bin/revolver
- sudo curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > .bin/color
- curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > .bin/revolver
- curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > .bin/color
- chmod u+x .bin/{color,revolver}
- export PATH="$PWD/.bin:$PATH"
script: ./zunit
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,27 @@ directories:
To set up ZUnit for a new project, just run `zunit init` in the project's root directory. This will create the `.zunit.yml` config file and relevant directories, including an example test.

### [Travis CI](https://travis-ci.org) config

ZUnit can generate a `.travis.yml` file for you, which contains the build steps needed to install ZUnit's dependencies and then run tests. Just run `zunit init --travis` when initialising your project.

An example `.travis.yml` is below:

```yaml
addons:
apt:
packages:
zsh
before_script:
- mkdir .bin
- curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > .bin/revolver
- curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > .bin/color
- curl -L https://raw.githubusercontent.com/molovo/zunit/master/zunit > .bin/zunit
- chmod u+x .bin/{color,revolver,zunit}
- export PATH="$PWD/.bin:$PATH"
script: zunit
```

## Running Tests

The CLI program `zunit` is used to run tests.
Expand Down Expand Up @@ -286,6 +307,15 @@ zunit --tap
zunit --output-text
```

### HTML Reports

ZUnit is capable of producing a detail HTML report, which you can view in your browser.

```sh
# Prints HTML report to the _output directory
zunit --output-html
```

### Risky Tests

By default, risky tests (those that make no assertions) raise a warning in the test output. To supress this behaviour, and allow risky tests to pass without warning, use the `--allow-risky` option.
Expand Down
Loading

0 comments on commit 84330d4

Please sign in to comment.