Sha256: 60ab550dcb546dcb5869645855579b53ad593c43aa9f0afd14ab12a1a6bcd438

Contents?: true

Size: 621 Bytes

Versions: 2

Compression:

Stored size: 621 Bytes

Contents

# frozen_string_literal: true

RSpec.describe YARD::Server do
  describe ".register_static_path" do
    it "registers a static path" do
      YARD::Server.register_static_path 'foo'
      expect(YARD::Server::Commands::StaticFileCommand::STATIC_PATHS.last).to eq "foo"
    end

    it "does not duplicate paths" do
      paths = YARD::Server::Commands::StaticFileCommand::STATIC_PATHS
      count = paths.size
      YARD::Server.register_static_path 'foo2'
      YARD::Server.register_static_path 'foo2'
      expect(paths.size).to eq(count + 1)
      expect(paths.last).to eq 'foo2'
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yard-0.9.18 spec/server_spec.rb
yard-0.9.17 spec/server_spec.rb