Sha256: 38627d96ffec18af199ab9ee61c8e2f5ef9acafe3c73683613445bdd0ccd79d0

Contents?: true

Size: 775 Bytes

Versions: 21

Compression:

Stored size: 775 Bytes

Contents

# frozen_string_literal: true

RSpec.describe YARD::Parser::Base do
  describe "#initialize" do
    class MyParser < Parser::Base; def initialize(a, b) end end

    it "takes 2 arguments" do
      expect { YARD::Parser::Base.new }.to raise_error(ArgumentError,
        /wrong (number|#) of arguments|given 0, expected 2/)
    end

    it "raises NotImplementedError on #initialize" do
      expect { YARD::Parser::Base.new('a', 'b') }.to raise_error(NotImplementedError)
    end

    it "raises NotImplementedError on #parse" do
      expect { MyParser.new('a', 'b').parse }.to raise_error(NotImplementedError)
    end

    it "raises NotImplementedError on #tokenize" do
      expect { MyParser.new('a', 'b').tokenize }.to raise_error(NotImplementedError)
    end
  end
end

Version data entries

21 entries across 20 versions & 4 rubygems

Version Path
yard-0.9.24 spec/parser/base_spec.rb
yard-0.9.23 spec/parser/base_spec.rb
yard-0.9.22 spec/parser/base_spec.rb
yard-0.9.21 spec/parser/base_spec.rb
yard-0.9.20 spec/parser/base_spec.rb
yard-0.9.19 spec/parser/base_spec.rb
yard-0.9.16 spec/parser/base_spec.rb
yard-0.9.15 spec/parser/base_spec.rb
yard-0.9.14 spec/parser/base_spec.rb
yard-0.9.13 spec/parser/base_spec.rb
yard-0.9.12 spec/parser/base_spec.rb
yard-0.9.11 spec/parser/base_spec.rb
yard-0.9.10 spec/parser/base_spec.rb
yard-0.9.9 spec/parser/base_spec.rb
etude_for_ruby-0.1.4 vendor/bundle/ruby/2.4.0/gems/yard-0.9.8/spec/parser/base_spec.rb
etude_for_ruby-0.1.4 vendor/bundle/ruby/2.2.0/gems/yard-0.9.8/spec/parser/base_spec.rb
mdg-1.0.1 vendor/bundle/ruby/2.3.0/gems/yard-0.9.8/spec/parser/base_spec.rb
yard-0.9.8 spec/parser/base_spec.rb
abaci-0.3.0 vendor/bundle/gems/yard-0.9.7/spec/parser/base_spec.rb
yard-0.9.7 spec/parser/base_spec.rb