Sha256: f9e03270fb5257d2e88c1725ecd622f133b640d4f5750c34277edf01fbbda371

Contents?: true

Size: 747 Bytes

Versions: 2

Compression:

Stored size: 747 Bytes

Contents

require 'helper'

describe Twitter::SourceUser do

  describe "#==" do
    it "returns true when objects IDs are the same" do
      saved_search = Twitter::SourceUser.new(:id => 1, :name => "foo")
      other = Twitter::SourceUser.new(:id => 1, :name => "bar")
      (saved_search == other).should be_true
    end
    it "returns false when objects IDs are different" do
      saved_search = Twitter::SourceUser.new(:id => 1)
      other = Twitter::SourceUser.new(:id => 2)
      (saved_search == other).should be_false
    end
    it "returns false when classes are different" do
      saved_search = Twitter::SourceUser.new(:id => 1)
      other = Twitter::Identity.new(:id => 1)
      (saved_search == other).should be_false
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
twitter-4.1.0 spec/twitter/source_user_spec.rb
twitter-4.0.0 spec/twitter/source_user_spec.rb