Sha256: 29e58e69b837b943c8fe39d805a60ee43a3c8da3159096009b0ec04fa41a7ed6
Contents?: true
Size: 906 Bytes
Versions: 4
Compression:
Stored size: 906 Bytes
Contents
require File.join(File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__)))), 'spec_helper') require File.join(File.dirname(File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__))))), 'lib', 'reek', 'source', 'code_comment') include Reek::Source describe CodeComment do context 'comment checks' do it 'rejects no comment' do CodeComment.new('').is_descriptive?.should be_false end it 'rejects an empty comment' do CodeComment.new('#').is_descriptive?.should be_false end it 'rejects a 1-word comment' do CodeComment.new("# fred\n# ").is_descriptive?.should be_false end it 'accepts a 2-word comment' do CodeComment.new('# fred here ').is_descriptive?.should be_true end it 'accepts a multi-word comment' do CodeComment.new("# fred here \n# with \n # biscuits ").is_descriptive?.should be_true end end end
Version data entries
4 entries across 4 versions & 1 rubygems