The specializations are stored in a class instance variable. However,
they are accessed from the specialize_driver method via `self.class`.
Previously if this method was called on an instance of a subclass of
Selenium::Driver, then it accessed the class instance variable
associated with the subclass (which is nil by default) and not the class
instance variable associated with the Selenium::Driver class as intended
resulting in an exception like this:
NoMethodError:
private method `select' called for nil:NilClass
./lib/capybara/selenium/driver.rb:417:in `specialize_driver'
./lib/capybara/selenium/driver.rb:49:in `browser'
./lib/capybara/selenium/driver.rb:66:in `visit'
./lib/capybara/session.rb:277:in `visit'
./spec/selenium_spec_chrome.rb:118:in `block (3 levels) in <top (required)>'
This commit adds a spec using a subclass of Selenium::Driver with Chrome
to demonstrate the problem and fixes it by changing the
specialize_driver method to access the specializations via the
explicitly specified class name.
An alternative fix would be to use a class variable for specializations
and do away with the class attribute reader altogether.