Socket
Book a DemoInstallSign in
Socket

fluidity

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluidity

0.1.1
bundlerRubygems
Version published
Maintainers
1
Created
Source

Fluidity

Website / Report Issue / Source Code ( Build Status )


Fluidity is an assertions framework that provides a very elegant fluid notation for specifying test assertions.

Fluidity is built on top of the Assay assertions meta-framework, giving it a solid foundation. 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.

Instruction

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'

10.should.be.kind_of(Integer)

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

require 'fluidity/must'

10.must.be.kind_of(Integer)

Also provided is assert for those techy aficionados.

require 'fluidity/assert'

10.assert.kind_of(Integer)

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

10.should.not.be.an.instance_of?(String)

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:

10.shouldnt.be.instance_of?(String)

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.

Installation

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 http://rubyworks.github.com/setup.

Copyrights

Fluidity is copyrighted open source software.

Copyright (c) 2012 Rubyworks

This program can be modified and distributed in accordance with the terms of the BSD-2-Clause license.

See LICENSE.txt file for details.

FAQs

Package last updated on 21 Dec 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.