Sha256: 46761b8f8d419bbebbd09bc73b03799ba64e17f35c97820d787a6bfef9ac65e5
Contents?: true
Size: 643 Bytes
Versions: 2
Compression:
Stored size: 643 Bytes
Contents
require 'rubygems' $:.unshift File.expand_path("../../lib", __FILE__) gem 'rspec', '>= 2.5.0' require 'rspec' require 'rspec/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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
twitter-stream-0.1.13 | spec/spec_helper.rb |
twitter-stream-0.1.12 | spec/spec_helper.rb |