Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 6ffb29d24e05abbd9ffe3ea974140d6c70221807 1 parent c27883c
@amatsuda amatsuda authored
View
5 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.i_suck_and_my_tests_are_order_dependent!
View
5 actionpack/test/abstract_unit.rb
@@ -497,3 +497,8 @@ def shutdown
# Use N processes (N defaults to 4)
Minitest.parallel_executor = ForkingExecutor.new(PROCESS_COUNT)
end
+
+# 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.i_suck_and_my_tests_are_order_dependent!
View
5 actionview/test/abstract_unit.rb
@@ -340,3 +340,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.i_suck_and_my_tests_are_order_dependent!
View
5 activemodel/test/cases/helper.rb
@@ -13,3 +13,8 @@
require 'active_support/testing/autorun'
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.i_suck_and_my_tests_are_order_dependent!
View
5 activerecord/test/cases/helper.rb
@@ -201,3 +201,8 @@ def in_time_zone(zone)
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.i_suck_and_my_tests_are_order_dependent!
View
4 activesupport/lib/active_support/test_case.rb
@@ -22,10 +22,6 @@ def self.for_tag(tag)
yield if $tags[tag]
end
- # FIXME: we have tests that depend on run order, we should fix that and
- # remove this method call.
- self.i_suck_and_my_tests_are_order_dependent!
-
include ActiveSupport::Testing::TaggedLogging
include ActiveSupport::Testing::SetupAndTeardown
include ActiveSupport::Testing::Assertions
View
5 activesupport/test/abstract_unit.rb
@@ -38,3 +38,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.i_suck_and_my_tests_are_order_dependent!
View
4 railties/test/abstract_unit.rb
@@ -28,6 +28,10 @@ def jruby_skip(message = '')
end
class ActiveSupport::TestCase
+ # FIXME: we have tests that depend on run order, we should fix that and
+ # remove this method call.
+ self.i_suck_and_my_tests_are_order_dependent!
+
private
unless defined?(:capture)

6 comments on commit 6ffb29d

@sikachu
Collaborator

:+1:

I really hope we can remove this stupid flag soon.

@rafaelfranca

:+1:

BTW, we need to add this to CHANGELOG entry and release notes. or people application can break because they are really order dependent and people will not understand why.

@rafaelfranca

Just saw it was added. Thanks @amatsuda

@zzak
Collaborator

Can we bump minitest yet?

cc @amatsuda @rafaelfranca

@rafaelfranca

lets wait the stable branching

@zenspider

I've been working on a tool called minitest-bisect that helps hunt down order dependency issues. Thus far using it and previous incarnations of it, I've hunted down and killed off 3-4 rails test problems. It's driven out 3-4 in devise today alone. It probably needs some more polish and doco, but I think it's the answer to this stuff.

Please sign in to comment.
Something went wrong with that request. Please try again.