10 3 pts which step is optional when adding the new

This preview shows page 3 - 5 out of 9 pages.

10. (3 pts) Which step is OPTIONAL when adding the new action MoviesController#top_movies to RottenPotatoes? Assume no JavaScript on the browser. A. Add the instance method top_movies in movies_controller.rb B. Implement appropriate URI helper method(s) to generate necessary URIs, such as top_movies_path C. Ensure the action has a view to render in views/movies/top_movies.html.{haml,erb,…} D. Ensure a route to the action exists in config/routes.rb Explanation: B is optional (you don’t need helper methods). Given our discussion about JavaScript, students could say that C is optional, since an action does not necessarily render a view in response to an AJAX request. So I specify that there is no JavaScript, to forbid this answer.
11. (3 pts) Which statement is FALSE regarding Rails RESTful routes and the resources to which they refer?
12. (3 pts) What kind(s) of tests, if you have 100% coverage, guarantee bug-free code:
(iv) DU-coverage (all pairs of define X/use X for every variable X)
Ray L. Zapp is thinking about testing strategies for his new HashTable class, which uses Rainforest's cloud storage service to make hash tables persistent. For the next 4 questions, write the letter of the one BEST testing technique (from the list below) to achieve the listed testing goal. (Some testing techniques may be used more than once or not at all.) A. Black-box testing B. Fuzz testing C. Stubbing & mocking D. Mutation testing E. White-box/glass-box testing 13. __ B___ (1 pts) Making sure the hash table is robust when presented with nonsensical input 14. __ E___ (1 pts) Making sure hash collisions are handled properly 15. __ C___ (1 pts) Making sure his service behaves correctly when Rainforest's cloud storage service is offline or not accepting connections 16. __ D___ (1 pts) Improving the thoroughness of coverage of his test suite by uncovering test cases he missed
17. (3 pts) Which is the appropriate order for following the BDD/TDD cycle of Agile/XP?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture