Really loving this testing series. I've been using RSpec for years but it looks like Minitest now covers a lot of the functionality that made me choose RSpec back then.
One of the things I don't like about RSpec is the amount of setup and gems required. Going with the built-in testing framework avoids all that, which is a definite win for beginners and quick-starting projects.
Be great to see your comparison of Minitest and RSpec.
How about headless browsers for system tests? I see you can switch to
:headless_chrome but do you still get screenshots with that? Also, is a headless browser any faster?
Yeah, one of the reasons I choose to use Minitest over Rspec is that it's mostly just pure Ruby. You have a couple wrappers around
assert, but it's really just Ruby code. Less magic means it's more reliable to reason about.
Headless browsers I do believe can still generate screenshots. I will try it to make sure. The main reason you need a headless browser is on your server, you don't have a screen, so there's no windows to actually render. It's all virtual.
My 2 cents: there's a way to display screenshots directly in iTerm2 (and likely in others terminals too): https://www.iterm2.com/documentation-images.html
I found it very useful to see what's going on when tests fail without having to saving or opening any file :)
At 11:50 you show a bootstrap modal for confirmations. How do you build that to replace the browser modal that is by default generated for a typical delete button?
Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.