Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rails has nice snapshot testing.

It’s not so hard to make this in any language. Just emit output to a text file and have a flag in your test command to overwrite the snapshots instead of asserting that the current output matches the snapshot.

I found that I didn’t even use assertions sometimes. I’d just check git to see if there’s a diff in the snapshots for refactoring



Can you elaborate on Rails' snapshot testing? Are you talking about VCR / webmock?


Can’t find the specific library I’ve used. But this looks similar

https://github.com/danielma/museo




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: