hexdigest / GoUnit-Emacs

Emacs package for https://github.com/hexdigest/gounit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GoUnit-Emacs License

GoUnit-Emacs is a package for Emacs for automatically generating table driven tests. It uses gounit to generate missing tests based on its target source files' function and method signatures. Any new dependencies in the test files are automatically imported.

Demo

demo

Installation

Prequisite: Use go get to install and update the gounit tool:

$ go get -u github.com/hexdigest/gounit/...

Next, copy GoUnit-Emacs in your .emacs directory

cd ~/.emacs.d
wget https://raw.githubusercontent.com/hexdigest/GoUnit-Emacs/master/gounit.el

In your .emacs add the following:

;; gounit
(add-to-list 'load-path "~/.emacs.d/")
(require 'gounit)

Usage

Select some functions and run M-x gounit-region. This appends missing tests to an existing test file, or creates a new test file with them. To generate all missing tests use M-x gounit

License

GoUnit-Emacs is released under the Apache 2.0 License.

About

Emacs package for https://github.com/hexdigest/gounit


Languages

Language:Emacs Lisp 100.0%