From bc116a55ca3dd9f63a1f1ca7ade3623885adcc57 Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 13 Aug 2014 18:26:41 +0900 Subject: AM, AP, AV, and AMo tests are already order_independent! --- actionmailer/test/abstract_unit.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'actionmailer/test/abstract_unit.rb') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 1281b1bcfc..98d266bd73 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -51,8 +51,3 @@ def jruby_skip(message = '') end require 'mocha/setup' # FIXME: stop using mocha - -# FIXME: we have tests that depend on run order, we should fix that and -# remove this method call. -require 'active_support/test_case' -ActiveSupport::TestCase.my_tests_are_order_dependent! -- cgit v1.2.3 From 2ef0d3bea622ad8d61b2b2f47451ff0c9604637d Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 13 Aug 2014 22:29:30 +0900 Subject: actionmailer_tests_are_order_dependent! --- actionmailer/test/abstract_unit.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'actionmailer/test/abstract_unit.rb') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 98d266bd73..1281b1bcfc 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -51,3 +51,8 @@ def jruby_skip(message = '') end require 'mocha/setup' # FIXME: stop using mocha + +# FIXME: we have tests that depend on run order, we should fix that and +# remove this method call. +require 'active_support/test_case' +ActiveSupport::TestCase.my_tests_are_order_dependent! -- cgit v1.2.3 From e9ce987a9a6fdad436b5511874963e8485b66f84 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 13 Aug 2014 16:00:19 +0200 Subject: 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 ' /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 ' ``` where the `:smtp` delivery method was leaked over to other test cases. --- actionmailer/test/abstract_unit.rb | 5 ----- 1 file changed, 5 deletions(-) (limited to 'actionmailer/test/abstract_unit.rb') diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 1281b1bcfc..98d266bd73 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -51,8 +51,3 @@ def jruby_skip(message = '') end require 'mocha/setup' # FIXME: stop using mocha - -# FIXME: we have tests that depend on run order, we should fix that and -# remove this method call. -require 'active_support/test_case' -ActiveSupport::TestCase.my_tests_are_order_dependent! -- cgit v1.2.3