# Fix Minimal and fast BDD framework for Ruby. ![Fix](https://raw.githubusercontent.com/cyril/fix.rb/master/logo.svg) ## Status [![Gem Version](https://badge.fury.io/rb/fix.png)](http://badge.fury.io/rb/fix) [![Build Status](https://secure.travis-ci.org/cyril/fix.rb.png?branch=master)](http://travis-ci.org/cyril/fix.rb?branch=master) [![Coverage](https://coveralls.io/repos/cyril/fix.rb/badge.png?branch=master)](https://coveralls.io/r/cyril/fix.rb) [![Code Climate](https://codeclimate.com/github/cyril/fix.rb.png)](https://codeclimate.com/github/cyril/fix.rb) [![Dependencies](https://gemnasium.com/cyril/fix.rb.png)](https://gemnasium.com/cyril/fix.rb) [![Inline docs](http://inch-ci.org/github/cyril/fix.rb.png)](http://inch-ci.org/github/cyril/fix.rb) ![](https://ruby-gem-downloads-badge.herokuapp.com/fix?type=total) ## Rubies __Fix__ supports Ruby (MRI) 2+. ## Installation Add this line to your application's Gemfile: ```ruby gem 'fix' ``` And then execute: $ bundle Or install it yourself as: $ gem install fix ## Usage Given that you'd like to test the following class: ```ruby # app.rb class Meme def i_can_has_cheezburger? "OHAI!" end def will_it_blend? "YES!" end end ``` Define your tests as methods: ```ruby # spec.rb require "app" constant :Meme do call :new do scope "when asked about cheeseburgers" do call :i_can_has_cheezburger? do subject.should eql "OHAI!" end end scope "when asked about blending possibilities" do call :will_it_blend? do subject.should_not match /^no/i end end end end ``` And then, test it: ```bash $ fix ./spec.rb /Users/bob/spec.rb .. Finished in 0.004397 seconds 2 examples, 0 failures ``` PS: Thanks to the Minitest authors that I picked up the example. ## Contributing 1. Fork it ( https://github.com/cyril/fix.rb/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 ## Versioning __Fix__ uses [Semantic Versioning 2.0.0](http://semver.org). ## Copyright Copyright 2014 Cyril Wack – Released under [MIT License](LICENSE.md)