题目内容

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

Which of these is POOR advice for TDD?

A. Mock and stub early and often in unit tests
B. Aim for high unit test coverage
C. Sometimes it’s OK to use stubs and mocks in integration tests
D. Unit tests give you higher confidence of system correctness than integration tests

Which non-obvious statement about testing is FALSE?

A. Even 100% test coverage is not a guarantee of being bug-free
B. If you can stimulate a bug-causing condition in a debugger, you can capture it in a test
C. Testing eliminates the need to use a debugger
D. When you change your code, you need to change your tests as well

答案查题题库