Sha256: 52747056a5219196963c9b3e6ebae6081b080d066d97cbe323108b7b27bff534

Contents?: true

Size: 729 Bytes

Versions: 1

Compression:

Stored size: 729 Bytes

Contents

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

describe "YARD::Handlers::Ruby::#{LEGACY_PARSER ? "Legacy::" : ""}PrivateClassMethodHandler" do
  before(:all) { parse_file :private_class_method_handler_001, __FILE__ }

  it "should handle private_class_method statement" do
    Registry.at('A.c').visibility.should == :private
    Registry.at('A.d').visibility.should == :private
  end

  it "should fail if parameter is not String or Symbol" do
    undoc_error 'class Foo; private_class_method "x"; end'
    undoc_error 'class Foo; X = 1; private_class_method X.new("hi"); end'
  end unless LEGACY_PARSER

  it "should fail if method can't be recognized" do
    undoc_error 'class Foo2; private_class_method :x; end'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yard-0.8.7.4 spec/handlers/private_class_method_handler_spec.rb