Created
October 5, 2016 12:39
-
-
Save thiagoa/99dab97ee2057fac2177f8dd191b54c6 to your computer and use it in GitHub Desktop.
Build tweet double
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def build_tweet_double(user_name:, mention_name:, text:, created_at:) | |
user = instance_double(Twitter::User, screen_name: user_name) | |
mention = instance_double( | |
Twitter::Entity::UserMention, | |
screen_name: mention_name | |
) | |
instance_double( | |
Twitter::Tweet, | |
user: user, | |
text: text, | |
user_mentions: [mention], | |
created_at: created_at | |
) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment