11. What is the recommended approach for testing Ruby code? A. Only test critical parts of the code B. Don't write tests, rely on code reviews C. Manually test the code after each change D. Write automated tests using a testing framework 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
12. Which tool is commonly used for code formatting in Ruby projects? A. RDoc B. Rbenv C. RuboCop 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
13. What is the recommended naming convention for variables in Ruby? A. Pascal case B. Snake case C. Kebab case D. Pascal 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
14. What is the recommended way to document Ruby methods and classes? A. Using comments with specific formatting standards B. Using external documentation files C. Using documentation comments with tools like YARD or RDoc D. Using inline comments 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
15. What is the recommended indentation style in Ruby? A. Four spaces B. Tab character C. Eight spaces D. Two spaces 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
16. What is the recommended way to handle exceptions in Ruby? A. Using rescue blocks B. Using if-else statements C. Using begin-end blocks with raise D. Ignoring exceptions entirely 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
17. What is the recommended way to install Ruby gems in a project? A. Manually downloading and adding gem files to the project B. Using RubyGems C. Using gem install command D. Using Bundler 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
18. Which tool is commonly used for code formatting and linting in Ruby? A. RSpec B. SimpleCov C. RuboCop D. Pry 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
19. Which of the following is a good practice for writing clear and readable Ruby code? A. Embedding multiple responsibilities within a single method B. Using meaningful variable and method names C. Not adding any comments or documentation to the code D. Embedding multiple responsibilities within a single method 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
20. What is the purpose of a .gitignore file in a Ruby project? A. To specify the project's license B. To specify the dependencies for the project C. To specify files and directories that should be ignored by Git D. To specify the Ruby version for the project 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