TODAY I LEARNED

Approval Tests are a thing

In normal unit testing, you say expect(person.calculate_bmi).to eq(21) or something like that. Approvals allow you to assert the state of complex objects against a known state.

For example, you can say, Approvals.verify(person)

I had not heard of this approach, which is posed as an alternative to traditional TDD. http://approvaltests.com

Tweet

Learned by obie-fernandez on Dec 22, 2016

Discover our latest blog posts
  • #testing
  • view raw
  • permalink
  • 1 likes
previous TIL next TIL
  • Log in
  • ?

    TIL is an open-source project by MagmaLabs that exists to catalogue the sharing & accumulation of knowledge as it happens day-to-day. Posts have a 200-word limit, and posting is open to any MagmaLaber as well as selected friends of MagmaLabs. We hope you enjoy learning along with us.

    • /wearemagmalabs
  • statistics
  • search
  • Twitter