1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/library/delegate/delegator/private_methods_spec.rb

21 lines
676 B
Ruby
Raw Normal View History

require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../../fixtures/classes', __FILE__)
describe "Delegator#private_methods" do
before :all do
@simple = DelegateSpecs::Simple.new
@delegate = DelegateSpecs::Delegator.new(@simple)
@methods = @delegate.private_methods
end
it "does not include any method of the delegate object" do # since delegates does not forward private calls
@methods.should_not include :priv
@methods.should_not include :prot
@methods.should_not include :pub
end
it "includes all private instance methods of the Delegate class" do
@methods.should include :extra_private
end
end