Sha256: a1ac637f3946c30129e788237b7ed97d6fcc2bef976bfe7e70491c7799982f42

Contents?: true

Size: 175 Bytes

Versions: 9

Compression:

Stored size: 175 Bytes

Contents

module WaitFor
  extend self
  def wait_for(time=5)
    Timeout.timeout(time) do
      loop do
        value = yield
        return value if value
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
honkster-js-test-server-0.2.12 spec/spec_helpers/wait_for.rb
honkster-js-test-server-0.2.11 spec/spec_helpers/wait_for.rb
honkster-js-test-server-0.2.10 spec/spec_helpers/wait_for.rb
honkster-js-test-server-0.2.9 spec/spec_helpers/wait_for.rb
js-test-server-0.2.8 spec/spec_helpers/wait_for.rb
js-test-server-0.2.7 spec/spec_helpers/wait_for.rb
js-test-server-0.2.6 spec/spec_helpers/wait_for.rb
js-test-server-0.2.1 spec/spec_helpers/wait_for.rb
js-test-server-0.2.0 spec/spec_helpers/wait_for.rb