Sha256: 99536c39be8d7db1ea4f9352703a2d60a4298ec709a74f74a7f3eb4881c1ab63

Contents?: true

Size: 914 Bytes

Versions: 13

Compression:

Stored size: 914 Bytes

Contents

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

describe "YARD::Handlers::Ruby::#{RUBY18 ? "Legacy::" : ""}VisibilityHandler" do
  before(:all) { parse_file :visibility_handler_001, __FILE__ }
  
  it "should be able to set visibility to public" do
    Registry.at("Testing#pub").visibility.should == :public
    Registry.at("Testing#pub2").visibility.should == :public
  end
  
  it "should be able to set visibility to private" do
    Registry.at("Testing#priv").visibility.should == :private
  end
  
  it "should be able to set visibility to protected" do
    Registry.at("Testing#prot").visibility.should == :protected
  end
  
  it "should support parameters and only set visibility on those methods" do
    Registry['Testing#notpriv'].visibility.should == :protected
    Registry['Testing#notpriv2'].visibility.should == :protected
    Registry['Testing#notpriv?'].visibility.should == :protected
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
yard-0.5.8 spec/handlers/visibility_handler_spec.rb
yard-0.5.7 spec/handlers/visibility_handler_spec.rb
yard-0.5.6 spec/handlers/visibility_handler_spec.rb
yard-0.5.5 spec/handlers/visibility_handler_spec.rb
yard-0.5.4 spec/handlers/visibility_handler_spec.rb
yard-0.5.3 spec/handlers/visibility_handler_spec.rb
yard-0.5.2 spec/handlers/visibility_handler_spec.rb
yard-0.5.1p1 spec/handlers/visibility_handler_spec.rb
yard-0.5.1 spec/handlers/visibility_handler_spec.rb
yard-0.5.0 spec/handlers/visibility_handler_spec.rb
yard-0.4.0 spec/handlers/visibility_handler_spec.rb
yard-0.2.3.5 spec/handlers/visibility_handler_spec.rb
yard-0.2.3.4 spec/handlers/visibility_handler_spec.rb