1. Which testing framework is commonly used for behavior-driven development (BDD) in Ruby? A. MiniTest B. Test::Unit C. RSpec D. Cucumber 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
2. What is the purpose of a test suite in Ruby testing? A. A single test case B. A group of related test cases C. A test runner D. A single test case 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
3. Which assertion method is commonly used in RSpec for testing equality of values? A. expect(actual).to equal(expected) B. assert_equal(actual, expected) C. expect(actual).to eq(expected) D. assert_equal(expected, actual) 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
4. What is the purpose of a mock object in Ruby testing? A. Asserts that a particular condition is true B. Provides a placeholder for a method that will be defined later C. Checks if an object's methods are called with the correct arguments D. Simulates the behavior of a real object 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
5. Which command is commonly used to run RSpec tests from the command line? A. rspec spec B. ruby test.rb C. rspec run D. ruby rspec.rb 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
6. What is the purpose of the before hook in RSpec? A. Executes code after all examples B. Executes code before all 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 D No explanation is given for this question Let's Discuss on Board
7. Which assertion method is commonly used in MiniTest for testing equality of values? A. expect(actual).to eq(expected) B. expect(actual).to equal(expected) C. assert_equal(expected, actual) D. assert(expected, actual) 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
8. What is the purpose of a stub in Ruby testing? A. Checks if a method is called with the correct arguments B. Overrides the behavior of a method to return a specific value C. Provides a placeholder for a method that will be defined later D. Checks if a method is called with the correct arguments 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
9. Which testing framework is included in the Ruby standard library? A. Test::Unit B. Cucumber C. MiniTest D. RSpec 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
10. What is the purpose of a feature file in Cucumber testing? A. Contains the actual implementation of the application's features B. Specifies the requirements for a software feature C. Provides a detailed report of test results D. Describes the behavior of an application in plain text 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