RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Announcing minitest-snapshots 1.0.0

The minitest-snapshots gem has reached 1.0.0! It’s a simple minitest plugin for implementing Jest-style snapshot testing, so that you don’t have to manually maintain file fixtures for machine-generated data. Think of it as VCR, but for any value.

Use assert_matches_snapshot and mintest-snapshot takes care of the rest. To update existing snapshots, pass the -u option when running tests, just like Jest.

$ bin/rails test -u

minitest-snapshots is a small project and is open to contributions. Thanks for your interest!

https://github.com/mattbrictson/minitest-snapshots

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in