<commit_before>#commandmocker

[![Build Status](https://secure.travis-ci.org/timeredbull/commandmocker.png?branch=master)](http://travis-ci.org/timeredbull/commandmocker)

commandmocker is a simple utility for tests in Go. It adds command with expected output to the path.

For example, if you want to mock the command "ssh", you can write a test that looks like this:

    import (
        "github.com/globocom/commandmocker"
        "testing"
    )

    func TestScreamsIfSSHFail(t *testing.T) {
        path, err := commandmocker.Add("ssh", "ssh: Could not resolve hostname myhost: nodename nor servname provided, or not known")
        if err != nil {
            t.Error(err)
            t.FailNow()
        }
        defer commandmocker.Remove(path)<commit_msg>readme: update travis image<commit_after>#commandmocker

[![Build Status](https://secure.travis-ci.org/globocom/commandmocker.png?branch=master)](http://travis-ci.org/globocom/commandmocker)

commandmocker is a simple utility for tests in Go. It adds command with expected output to the path.

For example, if you want to mock the command "ssh", you can write a test that looks like this:

    import (
        "github.com/globocom/commandmocker"
        "testing"
    )

    func TestScreamsIfSSHFail(t *testing.T) {
        path, err := commandmocker.Add("ssh", "ssh: Could not resolve hostname myhost: nodename nor servname provided, or not known")
        if err != nil {
            t.Error(err)
            t.FailNow()
        }
        defer commandmocker.Remove(path)
{'fraction_non_alphanumeric': 0.10311284046692606, 'fraction_numerical': 0.0, 'mean_word_length': 3.0605263157894735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3413964', 'n_tokens_mistral': 475, 'n_tokens_neox': 459, 'n_words': 140}