Sha256: 5e9081927a563605a82a8a71cfc99380cf5e0b8ca4a2807d70ff54bcf17c3d12

Contents?: true

Size: 1.09 KB

Versions: 16

Compression:

Stored size: 1.09 KB

Contents

require 'ostruct'
require File.dirname(__FILE__) + '/../spec_helper.rb'
require File.dirname(__FILE__) + '/../../lib/twitter/cli/helpers'

class Configuration; end

def say(str)
  puts str
end

describe Twitter::CLI::Helpers do
  include Twitter::CLI::Helpers
  
  describe "outputting tweets" do
    before do
      Configuration.stub!(:[]=).and_return(true)
      @collection = [
        OpenStruct.new(
          :text => 'This is my long message that I want to see formatted ooooh so pretty with a few words on each line so it is easy to scan.',
          :created_at => Time.mktime(2008, 5, 1, 10, 15, 00).strftime('%Y-%m-%d %H:%M:%S'),
          :user => OpenStruct.new(:screen_name => 'jnunemaker')
        ),
        OpenStruct.new(
          :text => 'This is my long message that I want to see formatted ooooh so pretty with a.',
          :created_at => Time.mktime(2008, 4, 1, 10, 15, 00).strftime('%Y-%m-%d %H:%M:%S'),
          :user => OpenStruct.new(:screen_name => 'danielmorrison')
        )
      ]
    end
    
    specify "should properly format" do
      output_tweets(@collection)
    end
  end
end

Version data entries

16 entries across 16 versions & 7 rubygems

Version Path
anthonycrumley-twitter-0.3.8 spec/cli/helper_spec.rb
billymeltdown-twitter-0.3.8.1 spec/cli/helper_spec.rb
dschn-twitter-0.3.7.1 spec/cli/helper_spec.rb
dschn-twitter-0.3.7.2 spec/cli/helper_spec.rb
dustin-twitter-0.3.2.1 spec/cli/helper_spec.rb
dustin-twitter-0.3.2.2 spec/cli/helper_spec.rb
dustin-twitter-0.3.7 spec/cli/helper_spec.rb
handcrafted-twitter-0.4.0 spec/cli/helper_spec.rb
jnunemaker-twitter-0.3.1 spec/cli/helper_spec.rb
jnunemaker-twitter-0.3.4 spec/cli/helper_spec.rb
jnunemaker-twitter-0.3.5 spec/cli/helper_spec.rb
jnunemaker-twitter-0.3.6 spec/cli/helper_spec.rb
jnunemaker-twitter-0.3.7 spec/cli/helper_spec.rb
jnunemaker-twitter-0.3.8 spec/cli/helper_spec.rb
pjdavis-twitter-0.3.8 spec/cli/helper_spec.rb
pjdavis-twitter-0.3.9 spec/cli/helper_spec.rb