Eventually we will have to write a real find_in_tmdb. When that happens, we should:
A. Replace the call to to_receive in our test with a call to the real find_in_tmdb
B. Ensure the API to the real find_in_tmdb matches the fake one used by to_receive
C. Keep the to_receive seam in the spec, but if necessary, change the spec to match the API of the real find_in_tmdb
D. Remove this spec (test case) altogether since it isn’t really testing anything anymore
查看答案
Which of these, if any, is not a valid use of should or should_not?
A. result.should_not be_empty
B. 5.should be result
C. result.should_not match /^D'oh!$/
D. All of the above are valid uses
should_receive combines _____ and _____, whereas stub is only _____.
A mock and an expectation, a mock
B. A mock and an expectation, an expectation
C. A seam and an expectation, an expectation
D. A seam and an expectation, a seam
Which of the following kinds of data, if any, should not be set up as fixtures?
A. Movies and their ratings
B. TMDb API key
C. The application's time zone
D. Fixtures would be fine for all of these
Which statement(s) are TRUE about Implicit requirements?
A. They are often, but not always, derived from explicit requirements
B. They apply only to unit and functional tests, not integration tests
C. Testing them is lower priority than testing explicit requirements, since they don’t come from the customer
D. All of the above are true