11. Which assertion method is commonly used in Test::Unit for testing equality of values? A. assert_equal(expected, actual) B. expect(actual).to eq(expected) C. expect(actual).to equal(expected) D. assert(expected, actual) Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
12. What is the purpose of a matcher in RSpec? A. Records the interactions between objects B. Describes the behavior of an application in plain text C. Specifies the requirements for a software feature D. Checks if a value meets certain conditions Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
13. Which keyword is commonly used in Cucumber feature files to define a scenario? A. Then B. When C. Given D. And Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
14. What is the purpose of the let keyword in RSpec? A. Executes code before each example B. Defines a memoized helper method that can be used in examples C. Executes code after each example D. Executes code before each example Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board
15. What is the purpose of a step definition in Cucumber testing? A. Provides a detailed report of test results B. Describes the behavior of an application in plain text C. Maps a step in a feature file to a block of code that implements that step D. Specifies the requirements for a software feature Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
16. What is the purpose of a fixture in Ruby testing? A. Checks if a method is called with the correct arguments B. Simulates the behavior of a real object C. Overrides the behavior of a method to return a specific value D. Provides a fixed baseline for the test data Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
17. Which command is commonly used to run MiniTest tests from the command line? A. ruby test.rb B. rake test C. ruby minitest.rb D. minitest run Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option A No explanation is given for this question Let's Discuss on Board
18. What is the purpose of a scenario outline in Cucumber testing? A. Checks if a value meets certain conditions B. Provides a placeholder for a method that will be defined later C. Describes the behavior of an application in plain text D. Allows the same scenario to be run with different combinations of data Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option D No explanation is given for this question Let's Discuss on Board
19. Which method is commonly used to assert that a certain exception is raised in RSpec? A. assert_raises(ExceptionClass) { ... } B. expect { ... }.to throw_symbol(:exception_symbol) C. expect { ... }.to raise_error(ExceptionClass) D. assert_throw(:exception_symbol) { ... } Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option C No explanation is given for this question Let's Discuss on Board
20. What is the purpose of a cucumber tag in Cucumber testing? A. Describes the behavior of an application in plain text B. Labels scenarios with metadata C. Overrides the behavior of a method to return a specific value D. Describes the behavior of an application in plain text Answer & Solution Discuss in Board Save for Later Answer & Solution Answer: Option B No explanation is given for this question Let's Discuss on Board