Sha256: f8034f70251a1cdbae6ef4fbfba6b732421d87571cd1db86a8bcd0151c0d77f1

Contents?: true

Size: 753 Bytes

Versions: 17

Compression:

Stored size: 753 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")
      expect(saved_search == other).to 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)
      expect(saved_search == other).to be_false
    end
    it "returns false when classes are different" do
      saved_search = Twitter::SourceUser.new(:id => 1)
      other = Twitter::Identity.new(:id => 1)
      expect(saved_search == other).to be_false
    end
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
twitter-5.0.0.rc.1 spec/twitter/source_user_spec.rb
twitter-4.8.1 spec/twitter/source_user_spec.rb
twitter-4.8.0 spec/twitter/source_user_spec.rb
twitter-4.7.0 spec/twitter/source_user_spec.rb
twitter-4.6.2 spec/twitter/source_user_spec.rb
twitter-4.6.1 spec/twitter/source_user_spec.rb
twitter-4.6.0 spec/twitter/source_user_spec.rb
twitter-4.5.0 spec/twitter/source_user_spec.rb
twitter-4.4.4 spec/twitter/source_user_spec.rb
twitter-4.4.3 spec/twitter/source_user_spec.rb
twitter-4.4.2 spec/twitter/source_user_spec.rb
twitter-4.4.1 spec/twitter/source_user_spec.rb
twitter-4.4.0 spec/twitter/source_user_spec.rb
twitter-4.3.0 spec/twitter/source_user_spec.rb
twitter-4.2.0 spec/twitter/source_user_spec.rb
twitter-4.1.2 spec/twitter/source_user_spec.rb
twitter-4.1.1 spec/twitter/source_user_spec.rb