explicitely use public_method_defined instead of just method_defined

This commit is contained in:
Tim Felgentreff 2011-06-16 10:31:20 +02:00
parent c594558cf4
commit 2f5816eb08
1 changed files with 4 additions and 4 deletions

View File

@ -390,9 +390,9 @@ class SettingsTest < Test::Unit::TestCase
it 'is possible to use Module#public' do
@base.send(:define_method, :foo) { }
@base.send(:private, :foo)
assert !@base.method_defined?(:foo)
assert !@base.public_method_defined?(:foo)
@base.send(:public, :foo)
assert @base.method_defined?(:foo)
assert @base.public_method_defined?(:foo)
end
it 'is possible to use the keyword public in a sinatra app' do
@ -402,8 +402,8 @@ class SettingsTest < Test::Unit::TestCase
public
def pub; end
end
assert !app.method_defined?(:priv)
assert app.method_defined?(:pub)
assert !app.public_method_defined?(:priv)
assert app.public_method_defined?(:pub)
end
end