'If the predicate returns something truthy immediately, then
``loop_until`` returns a deferred that has already fired with that
value.'

@capture_logging(None)
def test_immediate_success(self, logger):

    result = object()
    def predicate():
        return result
    clock = Clock()
    d = loop_until(clock, predicate)
    self.assertEqual(self.successResultOf(d), result)
    action = LoggedAction.of_type(logger.messages, LOOP_UNTIL_ACTION)[0]
    assertContainsFields(self, action.start_message, {'predicate': predicate})
    assertContainsFields(self, action.end_message, {'action_status': 'succeeded', 'result': result})
