Under-The-Carpet Failing Assertion

Definition:

  • A test having the smell Under-the-carpet failing Assertion is a test that returns a successful test-result, but contains hidden assertions. A hidden assertion is an assertion that is put into comments, is not executed when the test runs, and which would actually throw an Error or Failure if the comment were removed.

Also Known As:

  • Commented Code in the Test

Code Example:

ICImporterTest >> #testImport
  ...
  self assert: eventAtDate textualDescription = 'blabla'"
  self assert: eventAtDate categories anyOne
  = (calendar categoryWithSummary: 'business').
  "self assert: ...

References:

Quality attributes

  • - Code Example

  • - Cause and Effect

  • - Frequency

  • - Refactoring