Sha256: c32843d44e5caafa3cb5c993ad5ff7c919594b202f1402d73fc6805e6a8b00f8

Contents?: true

Size: 466 Bytes

Versions: 3

Compression:

Stored size: 466 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Yardstick::Document, '#summary_text' do
  subject { described_class.new(docstring).summary_text }

  context 'when with summary' do
    let(:docstring) do
      "This is a method summary\n\nThis is a method body"
    end

    it { should eq('This is a method summary') }
  end

  context 'when without summary' do
    let(:docstring) do
      "\n\nThis is a method body"
    end

    it { should eq('') }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
yardstick-0.9.9 spec/unit/yardstick/document/summary_text_spec.rb
yardstick-0.9.8 spec/unit/yardstick/document/summary_text_spec.rb
yardstick-0.9.7 spec/unit/yardstick/document/summary_text_spec.rb