'If the file exists, the content is matched against the given matcher.
If it mismatches, the message includes both the filename and the
message from the underlying matcher.'

@given(observed=binary(average_size=10), expected=binary(average_size=10))
def test_file_exists_content_mismatch(self, observed, expected):

    assume((observed != expected))
    matcher = Equals(expected)
    path = self.make_temporary_path()
    path.setContent(observed)
    mismatch = file_contents(matcher).match(path)
    self.assertThat(mismatch.describe(), Equals(('%s    has    unexpected    contents:\n%s' % (path.path, matcher.match(observed).describe()))))
