it"should handle references nested in links with all the text"do
link_to_gfm("This should finally fix ##{issue1.id} and ##{issue2.id} for real",project_commit_path(@project,:id=>@commit.id)).should=="#{link_to"This should finally fix ",project_commit_path(@project,:id=>@commit.id)}#{link_to"##{issue1.id}",project_issue_path(@project,issue1),:title=>"Issue: #{issue1.title}",:class=>"gfm gfm-issue "}#{link_to" and ",project_commit_path(@project,:id=>@commit.id)}#{link_to"##{issue2.id}",project_issue_path(@project,issue2),:title=>"Issue: #{issue2.title}",:class=>"gfm gfm-issue "}#{link_to" for real",project_commit_path(@project,:id=>@commit.id)}"
end
it"should forward HTML options"do
link_to_gfm("This should finally fix ##{issue1.id} for real",project_commit_path(@project,:id=>@commit.id),:class=>"foo").shouldhave_selector(".foo")