diff options
Diffstat (limited to 'spec/ruby/core/kernel/private_methods_spec.rb')
| -rw-r--r-- | spec/ruby/core/kernel/private_methods_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/ruby/core/kernel/private_methods_spec.rb b/spec/ruby/core/kernel/private_methods_spec.rb index d0603c72b8..b0e6d042a9 100644 --- a/spec/ruby/core/kernel/private_methods_spec.rb +++ b/spec/ruby/core/kernel/private_methods_spec.rb @@ -1,28 +1,28 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../fixtures/classes', __FILE__) -require File.expand_path('../../../fixtures/reflection', __FILE__) +require_relative '../../spec_helper' +require_relative 'fixtures/classes' +require_relative '../../fixtures/reflection' # TODO: rewrite describe "Kernel#private_methods" do it "returns a list of the names of privately accessible methods in the object" do m = KernelSpecs::Methods.private_methods(false) - m.should include(:shichi) + m.should.include?(:shichi) m = KernelSpecs::Methods.new.private_methods(false) - m.should include(:juu_shi) + m.should.include?(:juu_shi) end it "returns a list of the names of privately accessible methods in the object and its ancestors and mixed-in modules" do m = (KernelSpecs::Methods.private_methods(false) & KernelSpecs::Methods.private_methods) - m.should include(:shichi) + m.should.include?(:shichi) m = KernelSpecs::Methods.new.private_methods - m.should include(:juu_shi) + m.should.include?(:juu_shi) end it "returns private methods mixed in to the metaclass" do m = KernelSpecs::Methods.new m.extend(KernelSpecs::Methods::MetaclassMethods) - m.private_methods.should include(:shoo) + m.private_methods.should.include?(:shoo) end end |
