Skip to content

Commit

Permalink
Define one-element hashes on a single line
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Jan 19, 2016
1 parent c9e16e0 commit 5f7a861
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions spec/twitter/tweet_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,7 @@

describe '#hashtags?' do
it 'returns true when the tweet includes hashtags entities' do
entities = {
:hashtags => [{:text => 'twitter', :indices => [10, 33]}]
}
entities = {:hashtags => [{:text => 'twitter', :indices => [10, 33]}]}
tweet = Twitter::Tweet.new(:id => 28_669_546_014, :entities => entities)
expect(tweet.hashtags?).to be true
end
Expand All @@ -195,9 +193,7 @@

describe '#media?' do
it 'returns true when the tweet includes media entities' do
entities = {
:media => [{:id => '1', :type => 'photo'}]
}
entities = {:media => [{:id => '1', :type => 'photo'}]}
tweet = Twitter::Tweet.new(:id => 28_669_546_014, :entities => entities)
expect(tweet.media?).to be true
end
Expand Down Expand Up @@ -351,9 +347,7 @@

describe '#symbols?' do
it 'returns true when the tweet includes symbols entities' do
entities = {
:symbols => [{:text => 'PEP'}]
}
entities = {:symbols => [{:text => 'PEP'}]}
tweet = Twitter::Tweet.new(:id => 28_669_546_014, :entities => entities)
expect(tweet.symbols?).to be true
end
Expand Down Expand Up @@ -411,9 +405,7 @@

describe '#uris?' do
it 'returns true when the tweet includes urls entities' do
entities = {
:urls => [{:url => 'https://t.co/L2xIBazMPf'}]
}
entities = {:urls => [{:url => 'https://t.co/L2xIBazMPf'}]}
tweet = Twitter::Tweet.new(:id => 28_669_546_014, :entities => entities)
expect(tweet.uris?).to be true
end
Expand Down Expand Up @@ -475,9 +467,7 @@

describe '#user_mentions?' do
it 'returns true when the tweet includes user_mention entities' do
entities = {
:user_mentions => [{:screen_name => 'sferik'}]
}
entities = {:user_mentions => [{:screen_name => 'sferik'}]}
tweet = Twitter::Tweet.new(:id => 28_669_546_014, :entities => entities)
expect(tweet.user_mentions?).to be true
end
Expand Down

0 comments on commit 5f7a861

Please sign in to comment.