5 ms·
I'm a fan of RSpec and any BDD (Behavioral Driven Development) type of framework. You are correct that they all do the same thing, but for me everything boils d
by westoque 3y ago
I'm a fan of RSpec and any BDD (Behavioral Driven Development) type of framework. You are correct that they all do the same thing, but for me everything boils down to which one provides the quickest understanding of the code by the reader.
There's another testing library in Ruby that is called minitest. The syntax is different, for example you would write "assert_equal num1, numb2". My problem with this is that you don't know which is the expected vs the actual values. Is it the first or second argument? On the otherhand, my framework of choice, RSpec would write this as "expect(num1).to eq(numb2)". The syntactic sugar alone makes this easier to understand.
- it_citizen 3y agoAfter years of development, RSpec is what made me stop testing the code manually. Rspec is one of those things that made me a better developer.