Sha256: acdc046432cbdf979dae40448aeee3a6eb9b436bc128a21d129ae42ddcd80ee8

Contents?: true

Size: 799 Bytes

Versions: 1

Compression:

Stored size: 799 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Yardstick::Parser, '.parse_paths' do
  subject(:document_set) { described_class.parse_paths(paths) }

  let(:paths)         { double('paths')                                       }
  let(:method_object) { double(file: 'foo.rb', line: 4, docstring: docstring) }
  let(:docstring)     { double('docstring')                                   }

  before do
    YARD.should_receive(:parse).with(paths, [], YARD::Logger::ERROR)
    YARD::Registry.stub(:all).with(:method).and_return([method_object])
  end

  it { should be_a(Yardstick::DocumentSet) }

  its(:length) { should be(1) }

  context 'first document' do
    subject { document_set.first }

    it { should be_a(Yardstick::Document) }

    its(:docstring) { should eq(docstring) }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yardstick-0.9.7 spec/unit/yardstick/parser/class_methods/parse_paths_spec.rb