Sha256: ae354e4e40ffd13396d07e285f2ddff397f75d44d448e76c863de850a3dcf84e

Contents?: true

Size: 304 Bytes

Versions: 20

Compression:

Stored size: 304 Bytes

Contents

# encoding: utf-8
require 'timeout'

module TestServer
  module SpecHelper
    module Timeout
      def run_for(seconds, &block)
        ::Timeout::timeout(seconds, &block)
      rescue ::Timeout::Error
      end
    end
  end
end

RSpec.configure do |c|
  c.include TestServer::SpecHelper::Timeout
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
test_server-0.5.2 spec/support/timeout.rb
test_server-0.5.1 spec/support/timeout.rb
test_server-0.5.0 spec/support/timeout.rb
test_server-0.4.1 spec/support/timeout.rb
test_server-0.4.0 spec/support/timeout.rb
test_server-0.3.7 spec/support/timeout.rb
test_server-0.3.6 spec/support/timeout.rb
test_server-0.3.5 spec/support/timeout.rb
test_server-0.3.4 spec/support/timeout.rb
test_server-0.3.2 spec/support/timeout.rb
test_server-0.3.1 spec/support/timeout.rb
test_server-0.2.4 spec/support/timeout.rb
test_server-0.2.3 spec/support/timeout.rb
test_server-0.2.2 spec/support/timeout.rb
test_server-0.2.1 spec/support/timeout.rb
test_server-0.2.0 spec/support/timeout.rb
test_server-0.1.2 spec/support/timeout.rb
test_server-0.1.1 spec/support/timeout.rb
test_server-0.1.0 spec/support/timeout.rb
test_server-0.0.11 spec/support/timeout.rb