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

Support argument matchers in have_enqueued_* #2211

Closed

Conversation

pirj
Copy link
Member

@pirj pirj commented Nov 21, 2019

Allows for:

have_enqueued_job.at(a_value_within(5.seconds).of(future))
have_enqueued_mail.at(a_value_within(5.seconds).of(future))

Fixes #2205 for 3.9

Time.at seems to be quite fine as per https://github.com/rails/rails/blob/a707072/activejob/lib/active_job/test_helper.rb#L679

This is a backport of #2206 to 3-9-maintenance

@pirj pirj self-assigned this Nov 21, 2019
@pirj pirj changed the base branch from master to 3-9-maintenance November 21, 2019 20:03
@pirj pirj force-pushed the composable-at-in-have_enqueued-matchers branch from 4765913 to 7b83000 Compare November 21, 2019 20:05
@pirj pirj force-pushed the composable-at-in-have_enqueued-matchers branch from d9f39f4 to fd1a54f Compare November 21, 2019 21:09
@JonRowe
Copy link
Member

JonRowe commented Nov 21, 2019

Hey @pirj our support policy for older versions of RSpec is generally not to back port enhancements, we will sometimes back port bug fixes if theres a good reason (across a major version at least) but as we prefer that the most recent up to date RSpec cater for as many people as possible and as all versions of supported Rails are supported by RSpec 4 I see no need to make an exception here.

@JonRowe JonRowe closed this Nov 21, 2019
@pirj pirj deleted the composable-at-in-have_enqueued-matchers branch November 22, 2019 07:05
@pirj
Copy link
Member Author

pirj commented Nov 22, 2019

Thanks, Jon. That makes our lives easier 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants