tpope / vim-rails

rails.vim: Ruby on Rails power tools
http://www.vim.org/scripts/script.php?script_id=1567
4.1k stars 383 forks source link

Add syntax highlight for ActionMailer assertions #541

Closed workgena closed 5 years ago

workgena commented 5 years ago

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 commented 5 years ago

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

workgena commented 5 years ago

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.