jarmo/RAutomation — pull request #42 by leviwilson (2012-12-19 16:15:58+00:00)
Title: force MsUia::Window#child to instantiate an MsUia::Window as well

When explicitly using a `:ms_uia` adapter in `RAutomation`, when accessing the `Window#child` method, you would get a `Window` object that called down into the `RAutomation::Adapter::Win32::Window` methods rather than a `RAutomation::Adapter::MsUia::Window` like the parent did. This patch forces the `Window` returned from `Window#child` to be just like its parent.

### Example Usage
```ruby
# assumes that RAUTOMATION_ADAPTER is NOT set to "ms_uia" (or not set at all)
window = RAutomation::Window.new :title => /Some Title/, :adapter => :ms_uia
child = window.child(:title => /About/)
# child.adapter == :ms_uia now, rather than :win32
```

### Notes
Since `SpecHelper` forces the "default" adapter for RAutomation when it runs, I had to do this outside of the normal `:if => SpecHelper.adapter == :ms_uia` filter. The spec assumes that the `RAUTOMATION_ADAPTER` environment variable is not set on your machine (so that `:win32` is the default).