MiniTest: Spec Style, Mocking & MiniTest vs. RSpec. MiniTest::Spec Style. describe User do before { @user = User.new(name: "Ada") } it "has the given name" do @user.name.must_equal "Ada" end end # describe/it blocks comp…
ReadMiniTest: Test Style, Assertions & setup/teardown. MiniTest is a lightweight testing framework shipped in Ruby's standard library. Rails uses it as the default (via `rails test`), and it supports both a classic xUnit-sty…
ReadSave this stack to your personal DevRecall — add your own notes, track what you're learning, and share what you know with the community.
Get started — free forever