Test’em <img src=“https://secure.travis-ci.org/neopoly/testem.png?branch=master” alt=“Build Status” />
Often used aliases for MiniTest::Spec.
Gem | Source | Documentation
Aliases often used MiniTest::Spec hooks to Rails-like hooks.
-
context
is aliased todescribe
-
it
is aliased toit
-
setup
is aliased tobefore
-
teardown
is aliased toafter
Installation
Add this line to your application’s Gemfile:
gem 'testem'
And then execute:
$ bundle
Or install it yourself as:
$ gem install testem
Usage
require 'minitest/autorun'
require 'testem'
class LockTest < Testem
let(:lock) { Lock.new }
setup do
lock.aquire
end
teardown do
lock.release
end
context "locked" do
test "is locked" do
assert lock.locked?
end
end
end
Test
rake test
Release
edit lib/testem.rb testem.gemspec
bundle exec rake release
Contributing
-
Fork it
-
Create your feature branch (‘git checkout -b my-new-feature`)
-
Commit your changes (‘git commit -am ’Add some feature’‘)
-
Push to the branch (‘git push origin my-new-feature`)
-
Create new Pull Request