https://github.com/matype/tapestry
Test Anything Protocol tools and its wrapper testing framework in Ruby
https://github.com/matype/tapestry
Last synced: 12 months ago
JSON representation
Test Anything Protocol tools and its wrapper testing framework in Ruby
- Host: GitHub
- URL: https://github.com/matype/tapestry
- Owner: matype
- License: mit
- Created: 2014-10-11T18:30:55.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-17T06:18:47.000Z (almost 12 years ago)
- Last Synced: 2025-05-18T22:35:41.439Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 152 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Tapestry
[TAP](http://testanything.org/) tools and its wrapper testing framework in Ruby.
Tapestry API is inspired by [tape](https://github.com/substack/tape).
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'tapestry'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install tapestry
## Usage
```ruby
require 'tapestry'
# @params [Integer] number of tests.
tapestry = Tapestry::Test.new(1)
expected = 2
actual = 1 + 1
msg = 'test1'
test_num = 1
tapestry.equal(expected, actual, msg, test_num)
```
## API
### tapestry.equal(a, b, msg, num)
Assert that `a == b` with an optional msg and test number.
Aliases: `tapestry.equals()`, `tapestry.is()`, `tapestry.is_equal_to()`, `tapestry.is_equal_in()`
### tapestry.not_equal(a, b, msg, num)
Assert that `a != b` with an optional msg and test number.
Aliases: `tapestry.is_not()`, `tapestry.is_not_equal_to()`, `tapestry.is_not_equal_in()`
### tapestry.description(msg)
Print `msg`.
Aliases: `tapestry.message()`, `tapestry.echo()`
## Contributing
1. Fork it ( https://github.com/[my-github-username]/tapestry/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request