Sha256: 87f099552d5b831254be3903f7c6c526dbe77ee74dede28512aacbe4786491fc

Contents?: true

Size: 750 Bytes

Versions: 1

Compression:

Stored size: 750 Bytes

Contents

require File.join(File.dirname(__FILE__), "..", "spec_helper")

include Handlers

def undoc_error(code)
  mock = mock("parser")
  mock.stub!(:namespace).and_return(Registry.root)
  mock.stub!(:namespace=).and_return nil
  mock.stub!(:owner).and_return(Registry.root)
  mock.stub!(:owner=).and_return nil
  mock.stub!(:scope).and_return(:instance)
  mock.stub!(:scope=).and_return nil
  mock.stub!(:visibility).and_return(:public)
  mock.stub!(:visibility=).and_return nil
  mock.stub!(:file).and_return('<STDIN>')
  mock.stub!(:parse).and_return nil
  mock.stub!(:load_order_errors).and_return false
  
  c = self.class.described_type.new(mock, Parser::StatementList.new(code).first)
  lambda { c.process }.should raise_error(UndocumentableError)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yard-0.2.2 spec/handlers/spec_helper.rb