diff options
author | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2017-03-27 21:13:44 +0900 |
---|---|---|
committer | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2017-03-29 09:04:30 +0900 |
commit | 24e0fa7c4ab81f6c2fb2b3af90ee217620f30d17 (patch) | |
tree | d1fae49114ece7ecfc6d81635485e6af724f2601 /activesupport | |
parent | 5ac89b168b049e895cc26db90fe54ee77b63bcbc (diff) | |
download | rails-24e0fa7c4ab81f6c2fb2b3af90ee217620f30d17.tar.gz rails-24e0fa7c4ab81f6c2fb2b3af90ee217620f30d17.tar.bz2 rails-24e0fa7c4ab81f6c2fb2b3af90ee217620f30d17.zip |
Make `driven_by` overridable
Sometimes we want to use rack_test partially instead of selenium for test speed:
```ruby
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :selenium, using: :chrome, screen_size: [1400, 1400], options: {url: "http://chrome:4444/wd/hub"}
end
class WithJavaScriptTest < ApplicationSystemTestCase
end
class WithoutJavaScriptTest < ApplicationSystemTestCase
driven_by :rack_test
end
```
In the abobe case, `WithoutJavaScriptTest` uses selenium because
`SystemTestCase` calls superclass' driver on `#initialize` (`self.class.superclass.driver.use`).
Using `class_attribute` can handle inherited `driven_by`.
Diffstat (limited to 'activesupport')
0 files changed, 0 insertions, 0 deletions