I see your point. I now begin to think that instead of "fixing" watir, I had to 
monkey patch it so

```ruby
module Watir
  module Wait
    def until(*args)
      time = Time.now
      Timecop.return
      super
      Timecop.freeze(time)
    end
  end
end
```

Or something like that.

However, there might be other people using both Timecop and Wait, and they will 
have the same problem I had before. Getting to it, yeah, that was exactly the 
problem, because `Timecop.freeze` mocks `Time` so `Time.now` always returns the 
same value. This, `Watir::Wait` never timed out.

---
Reply to this email directly or view it on GitHub:
https://github.com/watir/watir-webdriver/pull/242#issuecomment-33944128
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to