Rafael Mendonça França
967beb7229
Revert "MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now"
...
This reverts commit 98d0f7ebd34b858f12a12dcf37ae54fdbb5cab64.
2019-08-02 00:24:21 -04:00
Rafael Mendonça França
6384933994
Revert "You give jruby_skip & rubinius_skip a good name"
...
This reverts commit 8d2866bb80fbe81acb04f5b0c44f152f571fb29f.
2019-08-02 00:24:11 -04:00
Akira Matsuda
8d2866bb80
You give jruby_skip & rubinius_skip a good name
...
This hack prevails everywhere in the codebase by being copy & pasted, and it's actually not a negative thing but a necessary thing for framework implementors,
so it should better have a name and be a thing.
And with this commit, activesupport/test/abstract_unit.rb now doesn't silently autoload AS::TestCase,
so we're ready to establish clearner environment for running AS tests (probably in later commits)
2019-08-02 05:36:38 +09:00
Akira Matsuda
98d0f7ebd3
MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now
...
It's used everywhere, clean and mature enough
2019-08-02 05:36:15 +09:00
Fumiaki MATSUSHIMA
61c4be4777
Output junit format test report
2019-04-04 14:34:46 +09:00
Gannon McGibbon
5d6578d15b
Fix legacy fallback for parameterized mailers
2019-01-07 17:38:28 -05:00
Sakshi Jain
0fe2bb816f
Remove private def
2018-09-23 21:27:44 +05:30
Kir Shatrov
82df8c2ca5
Use frozen string literal in actionmailer/
2017-07-23 18:17:19 +03:00
Matthew Draper
87b3e226d6
Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
...
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e
Enforce frozen string in Rubocop
2017-07-01 02:11:03 +03:00
bogdanvlviv
40bdbce191
Define path with __dir__
...
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df003a96f0e490c43559747618d10f5f
2017-05-23 00:53:51 +03:00
Akira Matsuda
146e928800
Don't pollute Object with rubinius_skip and jruby_skip
...
we call them only in the tests
2017-01-17 18:51:50 +09:00
Akira Matsuda
c82fa18514
Use Encoding::UTF_8 constant for default_{internal,external} in the tests
2017-01-11 17:48:00 +09:00
Xavier Noria
b91ff557ef
applies new string literal convention in actionmailer/test
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:03:39 +02:00
Arthur Neves
2abcdfd978
Remove load_paths file
2016-02-27 13:03:57 -05:00
Yves Senn
a80fb6f9b3
tests, define Rails.root
before loading Action Mailer.
...
Since `bin/test` would define `Rails.root` before loading AM but `bundle
exec rake` would define it after loading AM, this lead to the following
test failure when using `bin/test`:
```
--- expected
+++ actual
@@ -1 +1 @@
-{:location=>"/var/folders/_r/9kh50y4j0vn7zgg2p65z1lcm0000gn/T/mails"}
+{:location=>"/Users/senny/Projects/rails/actionmailer/tmp/mails"}
```
This patch ensures that `Rails.root` is defined when loading AM to
achieve consistent test results.
2015-11-04 16:35:31 -05:00
Ronak Jangir
c48257b0af
Removed mocha from ActionMailer
2015-08-20 11:27:49 +05:30
Gaurav Sharma
baa773a520
not require mail file
...
```
it added in this commit (2a25c4ce6d
), now no warnings occur.
```
2015-05-29 21:25:28 +05:30
Matthew Draper
b5eb0b6cc3
Revert "Leave all our tests as order_dependent! for now"
...
This reverts commit 2f52f969885b2834198de0045748436a4651a94e.
Conflicts:
actionmailer/test/abstract_unit.rb
actionview/test/abstract_unit.rb
activemodel/test/cases/helper.rb
activerecord/test/cases/helper.rb
activesupport/test/abstract_unit.rb
railties/test/abstract_unit.rb
2015-03-06 04:38:54 +10:30
robertomiranda
ce8efcf296
Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
...
ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
2015-01-31 23:12:41 -05:00
Godfrey Chan
2b41343c34
Default to sorting user's test cases for now
...
Goals:
1. Default to :random for newly generated applications
2. Default to :sorted for existing applications with a warning
3. Only show the warning once
4. Only show the warning if the app actually uses AS::TestCase
Fixes #16769
2014-09-08 05:32:16 -07:00
Matthew Draper
2f52f96988
Leave all our tests as order_dependent! for now
...
We're seeing too many failures to believe otherwise.
This reverts commits bc116a55ca3dd9f63a1f1ca7ade3623885adcc57,
cbde413df3839e06dd14e3c220e9800af91e83ab,
bf0a67931dd8e58f6f878b9510ae818ae1f29a3a, and
2440933fe2c27b27bcafcd9019717800db2641aa.
2014-09-02 23:55:34 +09:30
Lucas Mazza
63f7b22a4e
Remove global helpers from the ActionMailer test suite.
2014-08-19 23:53:19 -03:00
Rafael Mendonça França
c78da4d5c4
Merge branch 'master' into loofah
...
Conflicts:
actionpack/CHANGELOG.md
2014-08-17 22:38:22 -03:00
Yves Senn
e9ce987a9a
use :test delivery method for base_test.rb
...
This solves errors like:
```
BaseTest#test_you_can_register_multiple_observers_to_the_mail_object_that_both_get_informed_on_email_delivery:
Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 25
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:541:in `initialize'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:541:in `open'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:541:in `tcp_socket'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:551:in `block in do_start'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/timeout.rb:101:in `call'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/timeout.rb:101:in `timeout'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:550:in `do_start'
/Users/senny/.rbenv/versions/2.1.2/lib/ruby/2.1.0/net/smtp.rb:520:in `start'
/Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
/Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/message.rb:2136:in `do_delivery'
/Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/message.rb:232:in `block in deliver'
/Users/senny/Projects/rails/actionmailer/lib/action_mailer/base.rb:528:in `block in deliver_mail'
/Users/senny/Projects/rails/activesupport/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/senny/Projects/rails/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/senny/Projects/rails/activesupport/lib/active_support/notifications.rb:164:in `instrument'
/Users/senny/Projects/rails/actionmailer/lib/action_mailer/base.rb:526:in `deliver_mail'
/Users/senny/Projects/rails/.bundle/gems/mail-2.6.1/lib/mail/message.rb:232:in `deliver'
/Users/senny/Projects/rails/actionmailer/test/base_test.rb:598:in `block (2 levels) in <class:BaseTest>'
/Users/senny/Projects/rails/actionmailer/test/base_test.rb:801:in `mail_side_effects'
/Users/senny/Projects/rails/actionmailer/test/base_test.rb:593:in `block in <class:BaseTest>'
```
where the `:smtp` delivery method was leaked over to other test cases.
2014-08-13 16:00:19 +02:00
Akira Matsuda
2ef0d3bea6
actionmailer_tests_are_order_dependent!
2014-08-13 22:30:23 +09:00
Akira Matsuda
bc116a55ca
AM, AP, AV, and AMo tests are already order_independent!
2014-08-13 21:25:10 +09:00
Rafael Mendonça França
a2400308ea
Merge branch 'master' into loofah
...
Conflicts:
actionpack/CHANGELOG.md
actionpack/test/controller/integration_test.rb
actionview/CHANGELOG.md
2014-08-12 11:10:42 -03:00
Rafael Mendonça França
e81f3c210e
Nobody sucks so nobody should call this awful method name
2014-08-12 10:51:41 -03:00
Akira Matsuda
6ffb29d24e
users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!
...
Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes
everyone's tests order dependent, which should never be done by the framework.
2014-08-12 19:37:04 +09:00
Rafael Mendonça França
fd6aaaa0c3
Stop requiring mocha automatically
...
We are planning to remove mocha from our test suite because of
performance problems. To make this possible we should stop require mocha
on ActionSupport::TestCase.
This should not affect applications since users still need to add mocha
to Gemfile and this already load mocha.
Added FIXME notes to place that still need mocha removal
2014-07-19 17:35:12 -03:00
Rafael Mendonça França
75fe384c81
Rails is a module not a class
2014-07-15 13:02:22 -03:00
Dmitry Polushkin
99f8d4feeb
add test coverage for the action mailer
2014-07-04 15:55:33 +01:00
Zuhao Wan
a1dbb4e7e0
Add unregister_template_handler to prevent leaks.
2014-06-12 18:49:40 +08:00
Gaurish Sharma
35e56f6fa5
standardize on jruby_skip & rbx_skip
...
This Adds helpers(jruby_skip & rbx_skip). In Future, Plan is to use
these helpers instead of calls directly to
RUBY_ENGINE/RbConfig/JRUBY_VERSION
2014-01-13 19:51:47 +05:30
Carlos Antonio da Silva
6802196a6b
Disable available locales checks to avoid warnings running the tests
2013-12-17 09:05:41 -02:00
Łukasz Strzałkowski
e868441896
Remove hard require to ActionView from ActionMailer
2013-08-25 11:39:12 +02:00
Łukasz Strzałkowski
d1760253f5
Load AV::Layout to AM::Base in railties
2013-08-25 11:39:11 +02:00
Łukasz Strzałkowski
2a25c4ce6d
Do not silance mail gem warnings.
...
I doesn't have any at the moment
2013-08-25 11:39:11 +02:00
Arun Agrawal
7e893717aa
As we are doing debug mode on
...
we don't need to silenced it
2013-08-02 14:34:15 -04:00
Rafael Mendonça França
5da4d5142a
Add active_support/testing/autorun
...
minitest/autorun load minitest/spec polluting the global namespace with
the DSL that we don't want on Rails
2012-12-31 13:57:24 -03:00
Jeremy Kemper
f9da785d0b
Move background jobs to the 'jobs' branch until fully baked. Not shipping with Rails 4.0.
2012-12-21 16:29:47 -08:00
Jeremy Kemper
2a301505ec
Use synchronous queue by default. Separate queued message delivery jobs from the queued message wrappers so the queue itself needn't be marshaled (due to queue reference QueuedMessage).
2012-09-16 22:37:47 -07:00
Santiago Pastorino
8577687fcb
Move queue classes to ActiveSupport
2012-09-14 14:10:00 -07:00
Rafael Mendonça França
45537f00b4
Allow users to configure the queue for the mailers
...
This allow the users to do:
config.action_mailer.queue = MyQueue.new
and
class UsersMailer < ActionMailer::Base
self.queue = MyQueue.new
end
2012-09-12 15:32:22 -03:00
Santiago Pastorino
34b23e7110
Action Mailer async flag is true by default using a Synchronous impl
2012-09-11 15:11:52 -07:00
Santiago Pastorino
36dd1857dc
Remove useless load path modifications
2012-05-11 19:00:35 -03:00
Marcelo Silveira
3d02195174
No need to work around 1.8 warnings anymore.
2012-05-03 09:10:33 -03:00
Aaron Patterson
b15d2c0708
require minitest rather than test/unit
2012-01-06 15:50:47 -08:00
Sergey Nartimov
5ca86ac8f9
deprecate String#encoding_aware? and remove its usage
2011-12-24 15:57:54 +03:00