method_missing should always be private
This commit is contained in:
parent
a9877659d1
commit
cb9de5938f
@ -15,12 +15,14 @@ module FakeFS
|
|||||||
FileSystem.find(target)
|
FileSystem.find(target)
|
||||||
end
|
end
|
||||||
|
|
||||||
def method_missing(*args, &block)
|
|
||||||
entry.send(*args, &block)
|
|
||||||
end
|
|
||||||
|
|
||||||
def respond_to?(method)
|
def respond_to?(method)
|
||||||
entry.respond_to?(method)
|
entry.respond_to?(method)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def method_missing(*args, &block)
|
||||||
|
entry.send(*args, &block)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
11
test/fake/symlink_test.rb
Normal file
11
test/fake/symlink_test.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib')
|
||||||
|
require 'fakefs/safe'
|
||||||
|
require 'test/unit'
|
||||||
|
|
||||||
|
class FakeSymlinkTest < Test::Unit::TestCase
|
||||||
|
include FakeFS
|
||||||
|
|
||||||
|
def test_symlink_has_method_missing_as_private
|
||||||
|
assert FakeSymlink.private_instance_methods.include?("method_missing")
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user