New Gem: Bond - A Spy-Based Testing and Mocking Library

Hi all -

As part of my work as a Computer Science Masters student at UC Berkeley
I’ve been working with Prof. George Necula to develop a new testing
library, called Bond, which introduces a new style of test assertions
that we refer to as spy-based testing. Essentially, rather than
explicitly coding all assertions about your test data, you allow the
library to take observations of your state/variables/objects at
specified “spy” points, and you can simply approve these observations
when your code runs correctly to have them saved as reference
observations for future runs of the test. This saves time when initially
writing tests, but really shines when updating tests to new behavior, as
we have an interactive flow that allows you to quickly reconcile
differences in new behavior and old behavior (often without changing any
code at all). There is a blog post with much more detailed information
and examples available here:
http://dreaming-neptune.blogspot.com/2016/02/bond-spy-based-testing-and-mocking.html,
and is available on RubyGems here:https://rubygems.org/gems/bond-spy
(you can gem install bond-spy to install). Work on the library is
ongoing so any feedback here or as comments on the blog would be much
appreciated!

Thanks and enjoy!
Erik

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs