Sha256: 534c0d8e25a5fe5caa1af8b78b7a1297542cfeccf6aeeb55c0b61296ab70b276
Contents?: true
Size: 1.37 KB
Versions: 2
Compression:
Stored size: 1.37 KB
Contents
require 'helper' describe Twitter::Trend do describe "#==" do it "returns false for empty objects" do trend = Twitter::Trend.new other = Twitter::Trend.new (trend == other).should be_false end it "returns true when objects names are the same" do trend = Twitter::Trend.new(:name => "#sevenwordsaftersex", :query => "foo") other = Twitter::Trend.new(:name => "#sevenwordsaftersex", :query => "bar") (trend == other).should be_true end it "returns false when objects names are different" do trend = Twitter::Trend.new(:name => "#sevenwordsaftersex") other = Twitter::Trend.new(:name => "#sixwordsaftersex") (trend == other).should be_false end it "returns false when classes are different" do trend = Twitter::Trend.new(:name => "#sevenwordsaftersex") other = Twitter::Base.new(:name => "#sevenwordsaftersex") (trend == other).should be_false end it "returns true when objects non-name attributes are the same" do trend = Twitter::Trend.new(:query => "foo") other = Twitter::Trend.new(:query => "foo") (trend == other).should be_true end it "returns false when objects non-name attributes are different" do trend = Twitter::Trend.new(:query => "foo") other = Twitter::Trend.new(:query => "bar") (trend == 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/trend_spec.rb |
twitter-4.0.0 | spec/twitter/trend_spec.rb |