Monthly Archives: January 2018

Alternative RSpec trick for testing methods with arguments

I just read this article titled Useful RSpec trick for testing method with arguments which shows a nifty way to write a repetitive test-suite where you want to verify different arguments give the correct/expected result. The method proposed by the author looks like this: RSpec.describe Daru::Index do let(:index) { [:a, :b, :c, :d] } […]