aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/comment_spec.rb
blob: 804ce608f19bebaf17bd3f72894f9e85a3a4e806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Comment do

  describe :first_three_words do

    it 'returns the first three words of the comment body' do
      comment = Comment.new(:body => 'Hello there Alaveteli technical people')
      comment.first_three_words.should == 'Hello there Alaveteli'
    end

  end

end