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

add missing require to have_enqueued_mail #2117

Merged
merged 1 commit into from May 19, 2019

Conversation

ignatiusreza
Copy link
Contributor

Hiya, I'm having issue when trying out #2047 in the beta release.. the error raised was You must pass an argument rather than a block to 'expect' to use the provided matcher (have enqueued mail ReservationMailer, :complete), or the matcher must implement 'supports_block_expectations?'.

which seems to be caused by the matcher not being required.. hence, this PR fix it by adding the missing require call..

@ignatiusreza ignatiusreza changed the base branch from master to 4-0-dev May 5, 2019 03:01
Copy link
Member

@benoittgt benoittgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks LGTM.

@fables-tales
Copy link
Member

Hi there @ignatiusreza I ran our build against this PR and got the following failing features:

cucumber features/matchers/have_enqueued_mail_matcher.feature:9 # Scenario: Checking mailer class and method name
cucumber features/matchers/have_enqueued_mail_matcher.feature:26 # Scenario: Checking mailer enqueued time
cucumber features/matchers/have_enqueued_mail_matcher.feature:43 # Scenario: Checking mailer enqueued with no wait
cucumber features/matchers/have_enqueued_mail_matcher.feature:60 # Scenario: Using alias method

do I need to do something to get these green ?

@ignatiusreza
Copy link
Contributor Author

hi @samphippen, I rebased the branch to run this PR against CI, and just noticed that it's failing when RAILS_VERSION is not on 5.* family.. sorry about that, i'll investigate further..

@ignatiusreza
Copy link
Contributor Author

I dig down a bit deeper, and found that the default mailer delivery job changed in rails 6 (see: rails/rails#34591 & rails/rails#34692).. in our test environment, rspec passes since it's still using ActionMailer::DeliveryJob, while cucumber failed since it is run against freshly generated rails 6 application and uses ActionMailer::MailDeliveryJob..

since this PR is about adding missing require line, should I open a different PR to update the job matching logic? or should I add it here? incidentally, I also opened a different PR for adding support for parameterized mailer in #2121.. so maybe it's best to consolidate the effort in that PR? wdyt?

@JonRowe
Copy link
Member

JonRowe commented May 14, 2019

I'm happy with this if you are @samphippen

@fables-tales
Copy link
Member

@ignatiusreza can you look at the build failures here and let us know what's up or if you need some help?

@ignatiusreza
Copy link
Contributor Author

@samphippen i found the issue and opened #2125 to address it.. i'll rebase this branch after #2125 is merged, and ci should pass..

@ignatiusreza
Copy link
Contributor Author

All green now!

@fables-tales
Copy link
Member

LGTM

@fables-tales fables-tales merged commit 7ff7c3e into rspec:4-0-dev May 19, 2019
@ignatiusreza ignatiusreza deleted the missing-require branch May 19, 2019 17:45
benoittgt pushed a commit to benoittgt/rspec-rails that referenced this pull request Aug 24, 2019
JonRowe added a commit that referenced this pull request Mar 10, 2020
JonRowe added a commit that referenced this pull request Mar 10, 2020
@JonRowe
Copy link
Member

JonRowe commented Mar 10, 2020

This has also been released in 3.9.1 now.

pirj pushed a commit that referenced this pull request Jun 29, 2020
pirj pushed a commit that referenced this pull request Jun 29, 2020
pirj pushed a commit that referenced this pull request Jul 20, 2020
pirj pushed a commit that referenced this pull request Jul 20, 2020
pirj pushed a commit that referenced this pull request Jul 21, 2020
pirj pushed a commit that referenced this pull request Jul 21, 2020
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

4 participants