watir / watir-rspec

Use Watir with RSpec with ease.
MIT License
43 stars 13 forks source link

undefined method `synchronize' for nil:NilClass (NoMethodError) #7

Closed sblond closed 10 years ago

sblond commented 10 years ago

Hi, I was using v0.0.3, and then had issues after updating to v1.1.0. When I create a new ActiveRecord instance in a spec, I get the following error:

NoMethodError:
       undefined method `synchronize' for nil:NilClass

After investigating a bit, I wonder if changes in file lib/watir/rspec/active_record_shared_connection.rb from commit c1ed8761bf5ca55060ab4259c0a769a705cbb211 could be responsible (@shared_connection_semaphore and @shared_connection are not visible in subclasses of ActiveRecord::Base).

jarmo commented 10 years ago

Oh, crap. And even tests do not expose that problem.

Currently i'm on a vacation and can't fix it, but if you're willing to send me a PR then that would be awesome! :)