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 syntax highlight for ActionMailer assertions #541

Merged
merged 1 commit into from
Apr 26, 2019
Merged

Add syntax highlight for ActionMailer assertions #541

merged 1 commit into from
Apr 26, 2019

Conversation

workgena
Copy link
Contributor

@workgena workgena commented Apr 24, 2019

Reference: https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html

class ContactTest < ActiveSupport::TestCase
  include ActionMailer::TestHelper

  test 'sending mail' do
    assert_enqueued_emails 1 do
      ContactMailer.welcome.deliver_later
    end
  end
end

@tpope
Copy link
Owner

tpope commented Apr 24, 2019

These are Rails specific and should go in the appropriate section (which might be a new section).

@workgena workgena changed the title Add syntax highlight for ActionMailer assertions WIP: Add syntax highlight for ActionMailer assertions Apr 25, 2019
Reference: https://api.rubyonrails.org/v5.1/classes/ActionMailer/TestHelper.html

```ruby
class ContactTest < ActiveSupport::TestCase
  include ActionMailer::TestHelper

  test 'sending mail' do
    assert_enqueued_emails 1 do
      ContactMailer.welcome.deliver_later
    end
  end
end
```
@workgena
Copy link
Contributor Author

workgena commented Apr 26, 2019

Move to this section

Also updated the example class ContactTest < ActiveSupport::TestCase. Mailer assertions can be used in any test-type by including the helper include ActionMailer::TestHelper, so I placed syn keyword ... to type_name('test').

PS: Pushed changes with force replacing original commit.

@workgena workgena changed the title WIP: Add syntax highlight for ActionMailer assertions Add syntax highlight for ActionMailer assertions Apr 26, 2019
@tpope tpope merged commit c9f34e5 into tpope:master Apr 26, 2019
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.

2 participants