Expect

Build Status Dependency Status Gem Version Inline docs Documentation

Expectation library with some built-in matchers for Ruby.

Contact

Rubies

Installation

Add this line to your application's Gemfile:

gem 'expect'

And then execute:

$ bundle

Or install it yourself as:

$ gem install expect

Usage

Equivalence expectation:

Expect.this { 'foo' }.not_to Eql: 'bar' # => true

Identity expectation:

Expect.this { :foo }.to Equal: :foo # => true

Regular expressions expectation:

Expect.this { 'foo' }.to Match: /^foo$/ # => true

Expecting errors expectation:

Expect.this { Boom }.to RaiseException: NameError # => true

Versioning

Expect follows Semantic Versioning 2.0.

Contributing

  1. Fork it
  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