Vidyalelo
Ruby Programming · all questions

Testing in Ruby (RSpec, MiniTest, etc.)
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

40

Questions

2/2

Page

Pick an option on a question to see the right answer and solution.

What is the purpose of a subject block in RSpec?

Select an option to see the answer and solution.

What is the purpose of a setup block in MiniTest?

Select an option to see the answer and solution.

Which command is commonly used to generate a new RSpec test file?

Select an option to see the answer and solution.

What is the purpose of a background section in a Cucumber feature file?

Select an option to see the answer and solution.

What is the purpose of the assert_empty method in MiniTest?

Select an option to see the answer and solution.

What is the purpose of the should syntax in RSpec?

Select an option to see the answer and solution.

Which keyword is commonly used in Cucumber feature files to define a background?

Select an option to see the answer and solution.

What is the purpose of the assert_match method in MiniTest?

Select an option to see the answer and solution.

What is the purpose of the be_a matcher in RSpec?

Select an option to see the answer and solution.

What is the purpose of the pending keyword in RSpec?

Select an option to see the answer and solution.

Which assertion method is commonly used in RSpec for testing if an object responds to a method?

Select an option to see the answer and solution.

Which command is commonly used to run Test::Unit tests from the command line?

Select an option to see the answer and solution.

What is the purpose of the assert_includes method in MiniTest?

Select an option to see the answer and solution.

Which command is commonly used to generate a new Cucumber feature file?

Select an option to see the answer and solution.

What is the purpose of a let! block in RSpec?

Select an option to see the answer and solution.

What is the purpose of a setup method in Test::Unit?

Select an option to see the answer and solution.

Which assertion method is commonly used in MiniTest for testing if an array is empty?

Select an option to see the answer and solution.

Which command is commonly used to run Cucumber tests from the command line?

Select an option to see the answer and solution.

What is the purpose of the assert_predicate method in MiniTest?

Select an option to see the answer and solution.

What is the purpose of the background keyword in Cucumber?

Select an option to see the answer and solution.