aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/lib/action_mailer/test_case.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen string literal in actionmailer/Kir Shatrov2017-07-231-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-121-2/+2
| | | | (I personally prefer writing one string in one line no matter how long it is, though)
* `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-051-1/+1
| | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* Privatize unneededly protected methods in Action MailerAkira Matsuda2016-12-241-8/+6
|
* Add load hooks to all tests classesRafael Mendonça França2016-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Usually users extends tests classes doing something like: ActionView::TestCase.include MyCustomTestHelpers This is bad because it will load the ActionView::TestCase right aways and this will load ActionController::Base making its on_load hooks to execute early than it should. One way to fix this is using the on_load hooks of the components like: ActiveSupport.on_load(:action_view) do ActionView::TestCase.include MyCustomTestHelpers end The problem with this approach is that the test extension will be only load when ActionView::Base is loaded and this may happen too late in the test. To fix this we are adding hooks to people extend the test classes that will be loaded exactly when the test classes are needed.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-4/+4
|
* applies new string literal convention in actionmailer/libXavier Noria2016-08-061-4/+4
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Clear ActionMailer deliveries on setup and teardownarktisklada2016-04-251-1/+4
| | | | Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
* Small typo on a method name:Edouard CHIN2016-04-151-2/+2
| | | | - clear_test_deliviers -> clear_test_deliveries
* fix class name typo.Yves Senn2016-02-161-2/+2
|
* reset `ActionMailer::Base.deliveries` in `ActionDispatch::IntegrationTest`.Yves Senn2016-02-161-1/+16
| | | | | | | | | Whenever you are sending emails in integration tests using the `:test` delivery method you need to make sure that `ActionMailer::Base.deliveries` is reset after every test. This piece of boilerplate code is present in all my applications that send emails. Let's have `ActionDispatch::IntegrationTest` reset the deliveries automatically.
* action mailer test cases protected method can be `# :nodoc:`Gaurav Sharma2015-10-041-5/+5
|
* Only include the needed assertionsRafael Mendonça França2014-10-071-1/+2
|
* fix tests on action_mailerschneems2014-10-071-1/+1
| | | Include appropriate helpers and use `assert_dom_equal` where applicable
* Add `set_delivery_method` and `restore_delivery_method` to ↵Lucas Mazza2014-08-191-0/+9
| | | | | | | | `ActionMailer::TestCase`. This way these methods are available outside the ActionMailer test suite, but they are still duplicated inside `test/abstract_unit` for test cases that don't inherit from the `ActionMailer::TestCase` class.
* Include the selector assertions on the test caseRafael Mendonça França2014-07-151-0/+2
| | | | | We don't need to require users to include this module on ActionMailer::TestCase
* Restore delivery method on teardowns.Timm2014-06-161-3/+2
|
* Restore test deliveries properly in ActionMailer.Zuhao Wan2014-06-071-0/+8
| | | | | | | | | | | `ActionMailer::Base.delivery_method` and `ActionMailer::Base.perform_deliveries` have leaked states. "delivery method can be customized per instance" and "delivery method can be customized in subclasses not changing the parent" in delivery_methods_test.rb will fail if test_helper_test.rb (in which TestHelperMailerTest is inherited from ActionMailer::TestCase) runs before it.
* Inherit from MiniTest::Unit::TestCase instead of MiniTest::SpecRafael Mendonça França2012-12-311-7/+0
|
* Also includes ConstantLookup dependency for controller and mailer testsAndy Lindeman2012-09-261-0/+1
|
* Support mailer tests using spec DSLMike Moore2012-09-241-3/+5
| | | | | Improve how mailer tests to resolve mailers from the test name. Add tests for mailer tests using the minitest spec DSL.
* Register mailer tests for minitest's spec DSLMike Moore2012-09-241-0/+7
|
* load active_support/core_ext/class/attribute in active_support/railsXavier Noria2012-08-021-1/+0
|
* test cases should inherit from AS::TestCaseAaron Patterson2012-01-051-0/+1
|
* Using InstanceMethods in a Concern is deprecatedJeremy Kemper2011-11-301-10/+6
|
* normalize arg for ActionMailer::TestCase tests methodAlexey Vakhov2011-10-031-1/+8
|
* class inheritable attributes is used no more! all internal use of class ↵Josh Kalderimis2010-11-201-2/+5
| | | | | | inheritable has been changed to class_attribute. class inheritable attributes has been deprecated. Signed-off-by: José Valim <jose.valim@gmail.com>
* Removes unused varsSantiago Pastorino2010-07-241-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Move ActionMailer::TC to AV::TC::BehaviorDavid Chelimsky2010-06-121-37/+51
| | | | | | [#4843 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Removing quoting.rb, upgrade to 2.1.3.6, changing all utf-8 references to ↵Mikel Lindsaar2010-04-111-3/+3
| | | | UTF-8, updating tests where incorrect encoding
* Delegated ActionMailer::Base.deliveries to Mail.deliveries, added callback ↵José Valim and Mikel Lindsaar2010-01-241-1/+1
| | | | support in Mail to call ActionMailer on delivery, moved deliver to deprecated API in preparation for new API
* Get rid of RAILS_ROOT deprecation on AM::TestCase.José Valim2010-01-191-1/+1
|
* Autoload AS test caseJoshua Peek2010-01-041-3/+0
|
* Adding :transfer_encoding -> :content_transfer_encoding as part of TmailCompatMikel Lindsaar2009-12-311-1/+1
|
* Remove unused code paths and require mail only when it's needed.José Valim2009-12-281-0/+1
|
* More updates... 45 errors left to get it working with Mail gemMikel Lindsaar2009-11-201-1/+1
|
* Starting again on actionmailer integration with mailMikel Lindsaar2009-11-121-1/+1
|
* use autoload instead of explicit requires for ActionMailerJoshua Peek2008-11-231-1/+1
|
* * Continue evolution toward ActiveSupport::TestCase and friends. #10679 ↵Jeremy Kemper2008-01-051-22/+14
| | | | | | | | | [Josh Peek] * TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that you don't have to call super in ActionMailer::TestCase#setup ↵David Heinemeier Hansson2008-01-031-1/+14
| | | | | | (closes #10406) [jamesgolick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8536 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* mailer_class is a class method not an instance method. [josh] Closes #10041Michael Koziarski2007-11-211-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce TestCase subclasses for testing rails applications allowing tests ↵Michael Koziarski2007-10-261-0/+59
to be DRY'd up a bit and to provide a path toward tidying up our monkeypatching of test/unit. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de