diff --git a/lib/fakefs/fake/symlink.rb b/lib/fakefs/fake/symlink.rb index aef056e..f4a81e9 100644 --- a/lib/fakefs/fake/symlink.rb +++ b/lib/fakefs/fake/symlink.rb @@ -15,12 +15,14 @@ module FakeFS FileSystem.find(target) end - def method_missing(*args, &block) - entry.send(*args, &block) - end - def respond_to?(method) entry.respond_to?(method) end + + private + + def method_missing(*args, &block) + entry.send(*args, &block) + end end end diff --git a/test/fake/symlink_test.rb b/test/fake/symlink_test.rb new file mode 100644 index 0000000..2c59c69 --- /dev/null +++ b/test/fake/symlink_test.rb @@ -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 \ No newline at end of file