Currently I have a like/dislike voting functionality that outputs in the following format:
Where like and dislike are clickable links that update the total count of like/dislike votes (represented by (#))
I am writing a cucumber test to check the like/dislike counts are correct. I'd like to check
...
Then I should see "like (2) dislike (0)"
However, my cucumber test isn't pass. Does anyone have any advice? The view is below:
<%= link_to "like", url_for(:action => 'like', :controller => 'comments', :id => c.id) %>
(<%= c.comment_votes.nil? ? 0 : c.comment_votes.count(:conditions => {:score => 1}) %>)
<%= link_to "dislike", url_for(:action => 'dislike', :controller => 'comments', :id => c.id) %>
(<%= c.comment_votes.nil? ? 0 : c.comment_votes.count(:conditions => {:score => -1}) %>)