README.md in minitest-chef-handler-0.6.9 vs README.md in minitest-chef-handler-1.0.0
- old
+ new
@@ -1,25 +1,36 @@
# Minitest Chef Handler
Run minitest suites after your Chef recipes to check the status of your system.
+[![Build Status](https://travis-ci.org/calavera/minitest-chef-handler.png)](https://travis-ci.org/calavera/minitest-chef-handler)
+
# Installation
+```Bash
+gem install minitest-chef-handler
```
-$ gem install minitest-chef-handler
-```
## Usage
-Add the report handler to your client.rb or solo.rb file:
+Option 1: Add the report handler to your client.rb or solo.rb file:
```ruby
require 'minitest-chef-handler'
report_handlers << MiniTest::Chef::Handler.new
```
+Options 2: Using [minitest-handler](https://github.com/btm/minitest-handler-cookbook)
+```Ruby
+# Vagrantfile
+chef.run_list = [
+ "your-recipes",
+ "minitest-handler"
+]
+```
+
### Test cases
Write your tests as normal MiniTest cases extending from MiniTest::Chef::TestCase:
```ruby
@@ -85,11 +96,16 @@
```ruby
file("/etc/fstab").must_have(:mode, "644")
package("less").must_be_installed
service("chef-client").must_be_running
+assert_directory "/etc", "root", "root", "755"
+assert_file "/etc/fstab", "root", "root", "644"
+assert_sh "ls /etc"
+assert_logrotate "/etc/logrotate.d/mysql"
```
+and [many more](lib/minitest-chef-handler/assertions.rb)
The resources supported are: `cron`, `directory`, `file`, `group`, `ifconfig`,
`link`, `mount`, `package`, `service` and `user`.
For example usage see the tests under the `examples/spec_examples` directory.
@@ -154,23 +170,13 @@
The instructions above have described how to use it in a Chef solo installation. If you want to distribute the handler to your Chef server check either the chef_handler cookbooks in the examples or [minitest-handler-cookbook](https://github.com/btm/minitest-handler-cookbook).
## Development
-Minitest-chef-handler should work with versions 10.x and versions 11.x of Chef.
-
-There are just two commands that you need to know to hack on this library.
-
-1. Load both versions of Chef dependencies:
-
-```
-$ script/bootstrap
-```
-
-2. Run unit and integration tests agains both versions of Chef:
-
-```
-$ script/test
+```Ruby
+bundle
+bundle exec rake # unit tests
+bundle exec vagrant up # integration tests (install virtualbox first and vagrant destroy -f afterwards to clean up)
```
## Copyright
Copyright (c) 2012 David Calavera. See LICENSE for details.