1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_dispatch
eileencodes 7c9af60e5c Call system test driver per-instance rather than globally
Previously the system test subclasses would call `driven_by` when the
app booted and not again when the test was initialized which resulted in
the driver from whichever class was called last to be used in tests.

In rails/rails#28144 the `driven_by` method was changed to run `use` on
setup and `reset` on teardown. While this was a viable fix this really
pointed to the problem that system test `driven_by` was a global
setting, rather than a per-class setting.

To alieviate this problem calling the driver should be done on an
instance level, rather than on the global level. I added an `initialize`
method to `SystemTestCase` which will call `use` on the superclass
driver. Running the server has been moved to `start_application` so that
it only needs to be called once on boot and no options from `driven_by`
were being passed to it.

This required a largish rewrite of the tests. Each test needs to utilize
the subclass so that it can properly test the drivers.
`ActionDispatch::SystemTestCase` shouldn't be called directly anymore.
2017-03-09 10:52:05 -05:00
..
http Removed the attribute_accessors required file: 2017-02-12 19:45:11 -05:00
journey Correct spelling 2017-02-05 19:00:18 -06:00
middleware Remove deprecated callbacks from ActionDispatch middlewares 2017-01-31 15:52:12 -05:00
request Document and update API for skip_parameter_encoding 2016-12-21 12:04:00 -08:00
routing Fix direct with params example [ci skip] 2017-03-06 08:33:39 +09:00
system_testing Call system test driver per-instance rather than globally 2017-03-09 10:52:05 -05:00
testing Remove unused require 2017-02-12 19:38:49 -07:00
journey.rb applies new string literal convention in actionpack/lib 2016-08-06 18:51:43 +02:00
railtie.rb Remove deprecated callbacks from ActionDispatch middlewares 2017-01-31 15:52:12 -05:00
routing.rb Fix Rubocop violations and fix documentation visibility 2016-12-28 21:53:51 -05:00
system_test_case.rb Call system test driver per-instance rather than globally 2017-03-09 10:52:05 -05:00