File: graph_spec.rb

package info (click to toggle)
yard 0.9.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,720 kB
  • sloc: ruby: 31,354; javascript: 7,608; makefile: 21
file content (18 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

RSpec.describe YARD::CLI::Graph do
  it "serializes output" do
    allow(Registry).to receive(:load).at_least(1).times
    allow(subject).to receive(:yardopts) { [] }
    expect(subject.options.serializer).to receive(:serialize).once
    subject.run
  end

  it "reads yardoc file from .yardopts" do
    allow(Registry).to receive(:load).at_least(1).times
    allow(subject).to receive(:yardopts) { %w(--db /path/to/db) }
    expect(subject.options.serializer).to receive(:serialize).once
    subject.run
    expect(Registry.yardoc_file).to eq '/path/to/db'
  end
end