Skip to content

Would be nice to see which were the params sent when they were not received #97

@tonatiuh

Description

@tonatiuh

Today I spent a considerable amount of time debugging why my job wasn't being scheduled, I was seeing an output like this

Failure/Error: MyWorker.should have_queued('first-param', 'second-param', 'third-param')
       expected that MailDeliverer would have [first-param, second-param, third-param] queued

I wasn't finding the origin of the problem, until I realised I had a typo in the params I was sending when enqueuing the job, something like this (notice the type on 'third param'):

Resque.enqueue(MyWorker, 'first-param', 'second-param', 'third param')

So what I'm proposing is to modify the matchers to make them give more details when fail, so that they say what was expected and what is being received, something like this:

Failure/Error: MyWorker.should have_queued('first-param', 'second-param', 'third-param')
       expected that MyWorker would have [first-param, second-param, third-param]
queued
       got MyWorker having [first-param, second-param, third param]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions