1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/railties/test/application
Kasper Timm Hansen e4f0608164 Fix line filters running tests from multiple runnables.
`derive_regexp` was written with the assumption that we were run from a
blank slate — that if the filter didn't match we might as well return it
because it was nil.

This isn't the case because minitest calls `run` on every runnable. Which
is any subclass of Minitest::Runnable, such as ActiveSupport::TestCase,
ActionDispatch::IntegrationTest as well as any inheriting from those.

Thus after the first `run` we'd have put in a composite filter in
`options[:filter]` making the next `run` create a linked list when it
failed to match the regexp and put the composite filter as the head.

Every runnable would accumulate more and more of the same filters,
which effectively acted like an expanding whitelist and we ran tests
from other runnables.

Clog the accumulation by returning nil if there's no filter to derive
a regexp from.

Note: we pass a seed in the tests because Minitest shuffles the runnables
to ensure the whitelist is expanded enough that the failure is triggered.
2016-02-03 22:13:09 +01:00
..
configuration
initializers Be consistent in testing outputs from railties test and use /bin/rails everywhere(the default behaviour now) instead of mix of /bin/rake /bin/rails everywhere 2016-01-24 20:01:02 +05:30
middleware
rack
rake Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_metadata 2016-02-01 15:41:37 +00:00
asset_debugging_test.rb Be consistent in testing outputs from railties test and use /bin/rails everywhere(the default behaviour now) instead of mix of /bin/rake /bin/rails everywhere 2016-01-24 20:01:02 +05:30
assets_test.rb Be consistent in testing outputs from railties test and use /bin/rails everywhere(the default behaviour now) instead of mix of /bin/rake /bin/rails everywhere 2016-01-24 20:01:02 +05:30
bin_setup_test.rb Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_metadata 2016-02-01 15:41:37 +00:00
configuration_test.rb
console_test.rb
generators_test.rb
loading_test.rb
mailer_previews_test.rb
middleware_test.rb
multiple_applications_test.rb
paths_test.rb
per_request_digest_cache_test.rb
rackup_test.rb
rake_test.rb use rails command in routes task 2016-02-03 08:17:25 +09:00
rendering_test.rb
routing_test.rb Introduce new welcome page for new projects 2016-01-26 00:27:49 +02:00
runner_test.rb
test_runner_test.rb Fix line filters running tests from multiple runnables. 2016-02-03 22:13:09 +01:00
test_test.rb Be consistent in testing outputs from railties test and use /bin/rails everywhere(the default behaviour now) instead of mix of /bin/rake /bin/rails everywhere 2016-01-24 20:01:02 +05:30
url_generation_test.rb