spec/twitter/place_spec.rb in twitter-5.10.0 vs spec/twitter/place_spec.rb in twitter-5.11.0
- old
+ new
@@ -1,8 +1,16 @@
require 'helper'
describe Twitter::Place do
+ describe '.new' do
+ it 'raises an IndexError when id or woeid is not specified' do
+ expect { Twitter::Place.new(:id => 1) }.not_to raise_error
+ expect { Twitter::Place.new(:woeid => 1) }.not_to raise_error
+ expect { Twitter::Place.new }.to raise_error(IndexError)
+ end
+ end
+
describe '#eql?' do
it 'returns true when objects WOE IDs are the same' do
place = Twitter::Place.new(:woeid => 1, :name => 'foo')
other = Twitter::Place.new(:woeid => 1, :name => 'bar')
expect(place).to eql(other)