What Shoulda Matchers Is Actually Doing For You
When i first encountered these shoulda matchers in a projects rspec (a ruby test framework) I was very sceptical:
it { is_expected.to validate_presence_of(:email) } it { is_expected.to have_many(:orders).dependent(:destroy) }
Maybe the validation is clear. But what it misses is the reason why. But this post makes clear that these matchers are much more than just a consise test.