Recall & Review
beginner
What is Minitest in Ruby on Rails?
Minitest is a lightweight testing framework that comes built-in with Ruby. It provides a simple way to write tests with minimal syntax and is easy to use for beginners.
Click to reveal answer
beginner
What is RSpec in Ruby on Rails?
RSpec is a popular testing framework for Ruby that uses a readable, descriptive syntax. It focuses on behavior-driven development (BDD) and helps write tests that describe how the app should behave.
Click to reveal answer
intermediate
How does Minitest syntax differ from RSpec syntax?
Minitest uses simple Ruby methods like `assert` and `refute` inside test classes, while RSpec uses `describe` and `it` blocks with human-readable phrases to describe tests.
Click to reveal answer
intermediate
Which testing style does RSpec promote?
RSpec promotes Behavior-Driven Development (BDD), focusing on describing the expected behavior of the application in a natural language style.
Click to reveal answer
beginner
Why might a beginner choose Minitest over RSpec?
Because Minitest is simpler, comes built-in with Ruby, and has less setup, beginners find it easier to start writing tests quickly without learning extra syntax.
Click to reveal answer
Which testing framework is included by default in Ruby on Rails?
✗ Incorrect
Minitest comes built-in with Ruby and Rails, so no extra installation is needed.
Which framework uses `describe` and `it` blocks for writing tests?
✗ Incorrect
RSpec uses `describe` and `it` blocks to write readable, behavior-focused tests.
What style of testing does RSpec encourage?
✗ Incorrect
RSpec is designed around BDD, focusing on describing app behavior.
Which framework is generally simpler for beginners to start with?
✗ Incorrect
Minitest has simpler syntax and requires less setup, making it beginner-friendly.
In Minitest, which method is commonly used to check if a value is true?
✗ Incorrect
Minitest uses `assert` to check if a condition is true.
Explain the main differences between Minitest and RSpec in Ruby on Rails.
Think about syntax, style, and ease of use.
You got /5 concepts.
Why might a Rails developer choose RSpec over Minitest for testing?
Consider the testing style and community around each.
You got /4 concepts.