Sha256: ed2200fbf0a642859ba882bb66e4e5c7dfe4f3c14e0e6ad5e61ae7dee6c68b6c

Contents?: true

Size: 1.24 KB

Versions: 2

Compression:

Stored size: 1.24 KB

Contents

require 'helper'

describe Twitter::Action::Reply do

  describe "#sources" do
    it "returns a collection of users who replied to a user" do
      sources = Twitter::Action::Reply.new(:sources => [{:id => 7505382}]).sources
      sources.should be_an Array
      sources.first.should be_a Twitter::User
    end
    it "is empty when not set" do
      sources = Twitter::Action::Reply.new.sources
      sources.should be_empty
    end
  end

  describe "#target_objects" do
    it "returns a collection of Tweets that reply to a user" do
      targets = Twitter::Action::Reply.new(:target_objects => [{:id => 25938088801}]).target_objects
      targets.should be_an Array
      targets.first.should be_a Twitter::Tweet
    end
    it "is empty when not set" do
      targets = Twitter::Action::Reply.new.target_objects
      targets.should be_empty
    end
  end

  describe "#targets" do
    it "returns a collection that contains the replied-to status" do
      targets = Twitter::Action::Reply.new(:targets => [{:id => 25938088801}]).targets
      targets.should be_an Array
      targets.first.should be_a Twitter::Tweet
    end
    it "is empty when not set" do
      targets = Twitter::Action::Reply.new.targets
      targets.should be_empty
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitter-4.1.0 spec/twitter/action/reply_spec.rb
twitter-4.0.0 spec/twitter/action/reply_spec.rb