Skip to content

expecting notifications not working? #163

Description

@LightMan

Hi, I am just trying to test if a notification is posted...

        expect(^{
            [[NSNotificationCenter defaultCenter] postNotificationName:@"notificationName" object:nil];
        }).to.notify(@"notificationName");

This tests fails with the expected value is nil/null, am I doing something wrong?

I debugged a little and here:
EXPMatcherImplementationBegin(postNotification, (id expected))
expected is always nil, so the block is never executed.

Furthermore it would be nice to check this tweet from AshFurrow talking about object:nil when posting the notification.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions