Sha256: cf6f46eb09fbc09e914fd0be21fb7aaf931ac9c3f77be39d3057c642c2cfc74b
Contents?: true
Size: 1.27 KB
Versions: 14
Compression:
Stored size: 1.27 KB
Contents
require 'helper' describe Twitter::Settings do describe '#trend_location' do it 'returns a Twitter::Place when trend_location is set' do settings = Twitter::Settings.new(:trend_location => {:countryCode => 'US', :name => 'San Francisco', :country => 'United States', :placeType => {:name => 'Town', :code => 7}, :woeid => 2_487_956, :parentid => 23_424_977, :url => 'http://where.yahooapis.com/v1/place/2487956'}) # rubocop:disable SymbolName expect(settings.trend_location).to be_a Twitter::Place end it 'returns nil when trend_location is not set' do settings = Twitter::Settings.new expect(settings.trend_location).to be_nil end end describe '#trend_location?' do it 'returns true when trend_location is set' do settings = Twitter::Settings.new(:trend_location => {:countryCode => 'US', :name => 'San Francisco', :country => 'United States', :placeType => {:name => 'Town', :code => 7}, :woeid => 2_487_956, :parentid => 23_424_977, :url => 'http://where.yahooapis.com/v1/place/2487956'}) # rubocop:disable SymbolName expect(settings.trend_location?).to be true end it 'returns false when trend_location is not set' do settings = Twitter::Settings.new expect(settings.trend_location?).to be false end end end
Version data entries
14 entries across 14 versions & 1 rubygems