Skip to content

Commit

Permalink
Add local testing Makefile
Browse files Browse the repository at this point in the history
Use `make test` to run test (no pun intended) for this library.

Use `make autotest` (thanks to watchexec dependency) to run test continuously
when introducing changes to either test or gem files.

Kept this ignored a long time, use it locally during development and
thought was good to have it part of the official repository.

For `autotest` to work, you will need the external `watchexec` dependency:
https://github.com/mattgreen/watchexec

[skip ci]
  • Loading branch information
luislavena committed Jun 25, 2017
1 parent ea6d562 commit fb8f235
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
RUBY ?= ruby # default name for Ruby interpreter

.PHONY: default
default: test

# `autotest` task uses `watchexec` external dependency:
# https://github.com/mattgreen/watchexec
.PHONY: autotest
autotest:
watchexec --exts rb --watch lib --watch test --clear "$(RUBY) -S rake test"

.PHONY: test
test:
$(RUBY) -S rake test

0 comments on commit fb8f235

Please sign in to comment.