Sha256: 8ef11063a90e3204d3c550b1b39d24c50ef041de617313c9f99cd9d0181b9aa3

Contents?: true

Size: 570 Bytes

Versions: 1

Compression:

Stored size: 570 Bytes

Contents

require 'simplecov'
require 'tweetstream'
require 'rspec'
require 'yajl'
require 'json'

def sample_tweets
  return @tweets if @tweets

  @tweets = []
  Yajl::Parser.parse(File.open(File.dirname(__FILE__) + '/data/statuses.json', 'r'), :symbolize_keys => true) do |hash|
    @tweets << hash
  end
  @tweets
end

def sample_direct_messages
  return @direct_messages if @direct_messages

  @direct_messages = []
  Yajl::Parser.parse(File.open(File.dirname(__FILE__) + '/data/direct_messages.json', 'r')) do |hash|
    @direct_messages << hash
  end
  @direct_messages
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tweetstream-1.1.4 spec/spec_helper.rb