Testing Ruby Mixins with Minitest in isolation

Mixins in Ruby are a very powerful feature. But knowing how to test them sometimes is not so obvious, especially to beginners. I think that this comes from mixins' nature - they get mixed into other classes. So, if you think that there is a lot to testing mixins and you easily get overwhelmed by it - take it easy, it’s not that hard. Let’s see how easy it is to test mixins, with some help from the lovely Minitest....

November 4, 2015 · 5 min · Ilija

How to write RSpec formatters from scratch

Recently I did an experiment with RSpec’s formatters. Turns out, the output that RSpec returns when you run your specs can be very customized for your own needs. Read on to learn how you can write custom RSpec formatters. Writing custom formatters RSpec allows customization of the output by creating your own Formatter class. Yep, it’s that easy. You just need to write one class and than require it into RSpec’s configuration to use it....

April 28, 2015 · 12 min · Ilija