Sha256: 49c14e1a1745553c9309b1cc7b256d3ec87af3e906454e5e29b65e1ae31c727a

Contents?: true

Size: 1018 Bytes

Versions: 38

Compression:

Stored size: 1018 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe YARD::Handlers::Processor do
  before do
    @proc = Handlers::Processor.new(OpenStruct.new(:parser_type => :ruby))
  end

  it "should start with public visibility" do
    @proc.visibility.should == :public
  end

  it "should start in instance scope" do
    @proc.scope.should == :instance
  end

  it "should start in root namespace" do
    @proc.namespace.should == Registry.root
  end

  it "should have a globals structure" do
    @proc.globals.should be_a(OpenStruct)
  end

  it 'should ignore HandlerAborted exceptions (but print debug info)' do
    class AbortHandlerProcessor < YARD::Handlers::Ruby::Base
      process { abort! }
    end
    stmt = OpenStruct.new(:line => 1, :show => 'SOURCE')
    @proc.stub!(:find_handlers).and_return([AbortHandlerProcessor])
    log.should_receive(:debug).with(/AbortHandlerProcessor cancelled from/)
    log.should_receive(:debug).with("\tin file '(stdin)':1:\n\nSOURCE\n")
    @proc.process([stmt])
  end
end

Version data entries

38 entries across 32 versions & 6 rubygems

Version Path
yard-0.8.7.6 spec/handlers/processor_spec.rb
yard-0.8.7.5 spec/handlers/processor_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
climine-0.0.7 vendor/bundle/ruby/2.1.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
climine-0.0.6 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
climine-0.0.5 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
yard-0.8.7.4 spec/handlers/processor_spec.rb
climine-0.0.4 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
climine-0.0.3 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
climine-0.0.2 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
climine-0.0.1 vendor/bundle/ruby/2.0.0/gems/yard-0.8.7.3/spec/handlers/processor_spec.rb
yard-0.8.7.3 spec/handlers/processor_spec.rb
yard-0.8.7.2 spec/handlers/processor_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/yard-0.8.7/spec/handlers/processor_spec.rb
candlepin-api-0.4.0 bundle/ruby/gems/yard-0.8.7/spec/handlers/processor_spec.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/yard-0.8.7/spec/handlers/processor_spec.rb
yard-0.8.7.1 spec/handlers/processor_spec.rb