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

Any plans to make this gem work with parallel tests? #76

Open
cseelus opened this issue Mar 3, 2019 · 1 comment
Open

Any plans to make this gem work with parallel tests? #76

cseelus opened this issue Mar 3, 2019 · 1 comment

Comments

@cseelus
Copy link

cseelus commented Mar 3, 2019

Rails 6 has parallel testing enabled by default, each test worker running under its own port.

This means, setting a server_port doesn't work anymore.

Edit: Just realized this Gem is dead :-)

Since I found nothing yet to replace CapybaraEmail, I monkey patched the deliver_later method from with test/application_system_test_case.rb:

class ApplicationSystemTestCase < ActionDispatch::SystemTestCase

  # Monkey patch to always deliver mails immediately, needed for CapybaraEmail to work
  class ActionMailer::MessageDelivery
    def deliver_later
      deliver_now
    end
  end
end
@mtomov
Copy link

mtomov commented Aug 28, 2019

Works fine for me with Rails 6!

Just added this piece to actually deliver the email, and not just enqueue it.

around { |example| perform_enqueued_jobs(&example) }

I use it successfully in system tests with:

driven_by :selenium, using: :headless_chrome

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

2 participants