Sha256: 9debf7ad82afc3a464aba334bd8f1355b1e97f6a78ad6a980c643f58ddf9ce90

Contents?: true

Size: 841 Bytes

Versions: 8

Compression:

Stored size: 841 Bytes

Contents

require 'rubygems'
require 'pubnub'
require 'pry'
require 'rr'
require 'stringio'
require 'webmock/rspec'
require 'vcr'

module AsyncHelper
  def eventually(options = {})
    timeout = options[:timeout] || 3
    interval = options[:interval] || 0.1
    time_limit = Time.now + timeout
    loop do
      begin
        yield
      rescue => error
      end
      return if error.nil?
      raise error if Time.now >= time_limit
      sleep interval
    end
  end
end

WebMock.disable_net_connect!

RSpec.configure do |config|
  config.include AsyncHelper
  config.mock_framework = :rspec
  config.tty = true
end

VCR.configure do |c|
  c.cassette_library_dir = 'fixtures/vcr_cassettes'
  c.hook_into :webmock
  c.default_cassette_options = {
      :match_requests_on => [:method, VCR.request_matchers.uri_without_param(:pnsdk, :uuid)]
  }
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pubnub-3.7.12 spec/spec_helper.rb
pubnub-3.7.11 spec/spec_helper.rb
pubnub-3.7.10 spec/spec_helper.rb
pubnub-3.7.9 spec/spec_helper.rb
pubnub-3.7.7 spec/spec_helper.rb
pubnub-3.7.5 spec/spec_helper.rb
pubnub-3.7.1 spec/spec_helper.rb
pubnub-3.7.0 spec/spec_helper.rb