News for hackers. Stuff that matters.
Re:Hurl, run and test HTTP requests with plain text by srcreigh on Friday November 25, 2022 @10:22PM (#33749567)
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

Re:Hurl, run and test HTTP requests with plain text by Spone on Saturday November 26, 2022 @01:46AM (#33750531)
Can you elaborate on Rails' snapshot testing? Are you talking about VCR / webmock?
Re:Hurl, run and test HTTP requests with plain text by srcreigh on Saturday November 26, 2022 @02:20PM (#33755704)
Can’t find the specific library I’ve used. But this looks similar

https://github.com/danielma/museo