Sha256: 29cbb64a29cd2ebb038560f3ed0ab808646ed3e43486e5ce48a6857abf296082
Contents?: true
Size: 640 Bytes
Versions: 5
Compression:
Stored size: 640 Bytes
Contents
require 'rubygems' $:.unshift File.expand_path("../../lib", __FILE__) gem 'rspec', '= 1.3.0' require 'spec' require 'spec/mocks' require 'twitter/json_stream' def fixture_path(path) File.join(File.dirname(__FILE__), '..', 'fixtures', path) end def read_fixture(path) File.read(fixture_path(path)) end def connect_stream(opts={}, &blk) EM.run { opts.merge!(:host => Host, :port => Port) stop_in = opts.delete(:stop_in) || 0.5 unless opts[:start_server] == false EM.start_server Host, Port, JSONServer end @stream = JSONStream.connect(opts) blk.call if blk EM.add_timer(stop_in){ EM.stop } } end
Version data entries
5 entries across 5 versions & 1 rubygems