All quizzes
Free quiz · 20 questions in the bank

MiniTest quiz

Test your MiniTest knowledge with a free interactive quiz — 20 questions with answers and explanations. No signup needed to play.

Question 1/12Score 0

What does `assert_equal(expected, actual)` do in MiniTest?

In this round
  1. What does `assert_equal(expected, actual)` do in MiniTest?
  2. What is a typical use of a "stub" (via `Object#stub` in MiniTest) in a test?
  3. In classic MiniTest::Test style, how is a test case typically defined?
  4. What does a "mock" object typically let a test do, when using MiniTest's built-in mocking support (`Minitest::Mock`)?
  5. What does `Minitest::Test#assert(condition, message = nil)` do when `condition` is falsy?
  6. What is a benefit of MiniTest's comparatively minimal feature set (relative to a heavier framework) for test suite performance?
  7. What is the role of `teardown` in a MiniTest::Test class?
  8. What are the two distinct testing styles MiniTest supports?
  9. How does Ruby on Rails' default test suite typically relate to MiniTest?
  10. Why would a developer prefer writing a focused, single-assertion test over cramming many unrelated assertions into one large MiniTest test method?
  11. What does it mean that MiniTest::Spec is "built on top of" MiniTest::Test rather than being a completely separate framework?
  12. Why might running tests in a random order (a MiniTest default behavior) help catch bugs that a fixed, predictable order would hide?
Gaps to close?
Read the curated MiniTest notes — core concepts, patterns, interview prep.
MiniTest notes

More quizzes

.NET.NET MAUIAbsintheAccessibilityActixActix Web