classProjectBrowseCommitsUserLookup<Spinach::FeatureStepsincludeSharedAuthenticationincludeSharedProjectincludeSharedPathsGiven'I have the user that authored the commits'do@user=create(:user,email: 'dmitriy.zaporozhets@gmail.com')create(:email,{user: @user,email: 'dzaporozhets@sphereconsultinginc.com'})endGiven'I click on commit link'dovisitproject_commit_path(@project,ValidCommit::ID)endGiven'I click on another commit link'dovisitproject_commit_path(@project,ValidCommitWithAltEmail::ID)endThen'I see commit info'dopage.shouldhave_contentValidCommit::MESSAGEcheck_author_link(ValidCommit::AUTHOR_EMAIL)endThen'I see other commit info'dopage.shouldhave_contentValidCommitWithAltEmail::MESSAGEcheck_author_link(ValidCommitWithAltEmail::AUTHOR_EMAIL)enddefcheck_author_link(email)author_link=find('.commit-author-link')author_link['href'].should==user_path(@user)author_link['data-original-title'].should==emailfind('.commit-author-name').text.should==@user.nameendend