Sha256: a53e27c2434b421ce9d22e151a737c85952ec105a60f1c66dcc74a6d9b5adee3

Contents?: true

Size: 821 Bytes

Versions: 5

Compression:

Stored size: 821 Bytes

Contents

require 'simplecov'
SimpleCov.start do
  add_group 'Tweetstream', 'lib/tweetstream'
  add_group 'Specs', 'spec'
end

$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'tweetstream'
require 'rspec'
require 'rspec/autorun'
require 'yajl'
require 'json'

def sample_tweets
  if @tweets
    @tweets
  else
    @tweets = []
    Yajl::Parser.parse(File.open(File.dirname(__FILE__) + '/data/statuses.json', 'r'), :symbolize_keys => true) do |hash|
      @tweets << hash
    end
    @tweets
  end
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

5 entries across 5 versions & 1 rubygems

Version Path
tweetstream-1.1.3 spec/spec_helper.rb
tweetstream-1.1.2 spec/spec_helper.rb
tweetstream-1.1.1 spec/spec_helper.rb
tweetstream-1.1.0 spec/spec_helper.rb
tweetstream-1.1.0.rc2 spec/spec_helper.rb