Sha256: 2eb6d9bc68d2a217ad4f420622eeded40238bae2d1cf843b03efdff030eb99c8
Contents?: true
Size: 376 Bytes
Versions: 1
Compression:
Stored size: 376 Bytes
Contents
class RailsExtras module RSpec module Support module WaitForAjax def self.wait_for_ajax counter = 0 while page.execute_script("return $.active").to_i > 0 counter += 1 sleep(0.1) raise "AJAX request took longer than 3 seconds." if counter >= 30 end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails_extras-0.1.5 | lib/rails_extras/rspec/support/wait_for_ajax.rb |