• F
    Make `driven_by` overridable · 24e0fa7c
    Fumiaki MATSUSHIMA 提交于
    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`.
    24e0fa7c
system_test_case_test.rb 501 字节