https://github.com/mislav/polyamory
A tool that knows how to run your tests regardless of framework
https://github.com/mislav/polyamory
Last synced: about 1 year ago
JSON representation
A tool that knows how to run your tests regardless of framework
- Host: GitHub
- URL: https://github.com/mislav/polyamory
- Owner: mislav
- Created: 2010-10-24T14:49:13.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2013-03-09T01:39:58.000Z (about 13 years ago)
- Last Synced: 2025-04-15T17:11:47.934Z (about 1 year ago)
- Language: Ruby
- Size: 173 KB
- Stars: 19
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Polyamory – the promiscuous test runner
Polyamory is a command-line tool that knows how to run your tests regardless of
the framework. It can either run the whole test suite or filter by keywords,
test case names, or tags. It remembers the differences between arguments for
different testing frameworks so you don't have to.
Frameworks supported:
* Cucumber in `features/**/*.feature`
* RSpec + Shoulda in `spec/**/*_spec.rb`
* test/unit, Shoulda, or anything else in `test/**/*_test.rb` or `test/**/test*.rb`
* Bats in `test/*.bats`
## Installation
# Mac OS X
brew install https://github.com/mislav/polyamory/raw/master/brew/polyamory.rb
# other
gem i polyamory
# alias for brevity
alias pam=polyamory
## Features
* `polyamory` - Runs the full test suite for any project. For example, it will
run all of the following:
rspec spec
cucumber features
ruby -e 'ARGV.each {|f| require f }' test/**/*_test.rb
* `polyamory ` - Runs all tests inside a subdirectory. For example:
polyamory models
-> runs test/models/**/*_test.rb
-> runs spec/models/**/*_spec.rb
* `polyamory ` - Runs all test files that match a keyword. For example:
polyamory search
-> runs test/models/user_search_test.rb
-> runs spec/controllers/search_controller_spec.rb
-> runs features/site_search.feature
* `polyamory :` - Runs focused test. Provides this feature for
test/unit and minitest which don't support it.
* `polyamory -n ` - Runs only tests whose names match given patterns.
* `polyamory -t ` - Runs RSpec/Cucumber tests that match given tags.
Tag exclusion is done with `~`. Tag names are normalized for Cucumber
(which expects them in form of `@`).