#{link_to('@'<<@people[0].name,person_path(@people[0]),:class=>'mention')} can mention people like Raphael #{link_to('@'<<@people[1].name,person_path(@people[1]),:class=>'mention')}
#{link_to('@'<<@people[0].name,person_path(@people[0]),:class=>'mention')} can mention people like Raphael #{link_to('@'<<@people[1].name,person_path(@people[1]),:class=>'mention')}
can mention people like Raphaellike Raphael #{link_to('@'<<@people[2].name,person_path(@people[2]),:class=>'mention')} can mention people like Raph
can mention people like Raphaellike Raphael #{link_to('@'<<@people[2].name,person_path(@people[2]),:class=>'mention')} can mention people like Raph
STR
STR
...
@@ -94,13 +93,13 @@ STR
...
@@ -94,13 +93,13 @@ STR
context'with :plain_text option'do
context'with :plain_text option'do
it'removes the mention syntax and displays the unformatted name'do
it'removes the mention syntax and displays the unformatted name'do
status=Factory(:status_message,:message=>"@{Barack Obama; barak@joindiaspora.com } is so cool @{Barack Obama; barak@joindiaspora.com } ")
status=Factory(:status_message,:message=>"@{Barack Obama; barak@joindiaspora.com } is so cool @{Barack Obama; barak@joindiaspora.com } ")
status.formatted_message(:plain_text=>true).should=='Barack Obama is so cool Barack Obama '
status.format_mentions(status.raw_message,:plain_text=>true).should=='Barack Obama is so cool Barack Obama '
end
end
end
end
it'leaves the name of people that cannot be found'do
it'leaves the name of people that cannot be found'do