Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tonatiuh opened this issue May 23, 2014 · 4 comments

Comments

@tonatiuh
Copy link

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]
@romeo4934
Copy link

Yeah I am really agree, I had the same problem ;)

@leshill
Copy link
Owner

leshill commented Jan 11, 2015

A PR to update the matchers output would be welcome.

@romeo4934
Copy link

yeah ;)

@tonatiuh
Copy link
Author

@leshill I just created this PR #114, could you let me know what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants