Fluidity is a an assertions notation built on top of the Assay assertions framework. It defines a set of methods that provide a fluid notation for specify test assertions.

Assay defines assertions in the same way that Ruby defines exceptions. Assay provides a complete set of these assertion classes for all common assertion needs. See Assay project for more information on this foundational library.


Developers want to write assertions easily and concisely. To this end Fluidity provides a flexible grammar system which can be used by requiring any of the prime grammar methods that extend Object. The most common is probably `should`.

require 'fluidity/should'

But if you are accustom to MiniTest’s spec methods, you might prefer `must`.

require 'fluidity/must'

Also provided is `assert` for those techy aficionados.

require 'fluidity/assert'


So what is so fluid about all this? Well, Fluidity allows the developer quite the English like expression. For instance.

Pretty neat, though perhaps bit excessive for a real-life use. Generally it’s good enough to use the shorter and a tad bit faster:

Speaking of fast, so what about speed? Of course, running through multiple extra method calls to make an assertion is going to be slower than making just a single method call. So, yes, tests might run a bit slower on Fluidity than they would with another less readable assertions system. However, method calls are pretty dang fast and unlikely to present any significant performance overhead on test runs. At most, tests runs might take a few additional seconds for very large test suites.


To install with RubyGems simply open a console and type:

$ gem install fluidity

Site installation with the tarball can be done with Ruby Setup (gem install setup). See


Copyright © 2012 Rubyworks

This program is distributed under the terms of the BSD-2-Clause license.

See COPYING.rdoc file for details.