Skip to content

Commit

Permalink
Declare subject above any other before declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Feb 4, 2023
1 parent 1c76c96 commit 1b7fefc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/twitter/streaming/event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

describe Twitter::Streaming::Event do
describe '#initialize' do
subject do
described_class.new(@data)
end
before do
@data = {event: 'follow', source: {id: 10_083_602, id_str: '10083602', name: 'Adam Bird', screen_name: 'adambird', location: 'Nottingham, UK', url: 'http://t.co/M1eaIKDQyz', description: 'CEO @onediaryapp, ex @esendex CTO and co-founder, still cycling', protected: false, followers_count: 1295, friends_count: 850, listed_count: 53, created_at: 'Fri Nov 09 00:35:12 +0000 2007', favourites_count: 93, utc_offset: 0, time_zone: 'London', geo_enabled: true, verified: false, statuses_count: 13_507, lang: 'en', contributors_enabled: false, is_translator: false, profile_background_color: 'C0DEED', profile_background_image_url: 'http://abs.twimg.com/images/themes/theme1/bg.png', profile_bacground_image_url_https: 'https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile: false, profile_image_url: 'http://pbs.twimg.com/profile_images/378800000477232297/23d85bb78f71534eea1e1133fb771f86_normal.jpeg', profile_image_url_https: 'https://pbs.twimg.com/profile_images/378800000477232297/23d85bb78f71534eea1e1133fb771f86_normal.jpeg', profile_link_color: '0084B4', profile_sidebar_border_color: 'C0DEED', profile_sidebar_fill_color: 'DDEEF6', profile_text_color: '333333', profile_use_background_image: true, default_profile: true, default_profile_image: false, following: false, follow_request_sent: false, notifications: false}, target: {id: 1_292_911_088, id_str: '1292911088', name: 'One Diary Bot', screen_name: 'onediarybot', location: nil, url: 'http://t.co/etHGc0xHX4', description: "I'm the One Diary bot, here to help you with your life including personal cycling weather forecasts.", protected: false, followers_count: 123, friends_count: 157, listed_count: 1, created_at: 'Sat Mar 23 23:52:18 +0000 2013', favourites_count: 0, utc_offset: nil, time_zone: nil, geo_enabled: false, verified: false, statuses_count: 9637, lang: 'en', contributors_enabled: false, is_translator: false, profile_background_color: 'C0DEED', profile_background_image_url: 'http://abs.twimg.com/images/themes/theme1/bg.png', profile_background_image_url_https: 'https://abs.twimg.com/images/themes/theme1/bg.png', profile_background_tile: false, profile_image_url: 'http://pbs.twimg.com/profile_images/3651575369/090551d8dd92080198f707769239ff43_normal.jpeg', profile_image_url_https: 'https://pbs.twimg.com/profile_images/3651575369/090551d8dd92080198f707769239ff43_normal.jpeg', profile_link_color: '0084B4', profile_sidebar_border_color: 'C0DEED', profile_sidebar_fill_color: 'DDEEF6', profile_text_color: '333333', profile_use_background_image: true, default_profile: true, default_profile_image: false, following: false, follow_request_sent: false, notifications: false}, created_at: 'Sun Oct 27 20:44:19 +0000 2013'}
end

subject do
described_class.new(@data)
end
it 'sets the name to be a symbolised version of string string' do
expect(subject.name).to eq(:follow)
end
Expand Down

0 comments on commit 1b7fefc

Please sign in to comment.