1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

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

View file

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