Sha256: ebc9759e315671937ee6fadb79cd2ad5a2430a6e14e46bef3c3cbfef28ebc98a
Contents?: true
Size: 1.08 KB
Versions: 2
Compression:
Stored size: 1.08 KB
Contents
require "test_helper" class FakeSymlinkTest < Test::Unit::TestCase include FakeFS def test_symlink_has_method_missing_as_private methods = FakeSymlink.private_instance_methods.map { |m| m.to_s } assert methods.include?("method_missing") end def test_symlink_respond_to_accepts_multiple_params fake_symlink = FakeSymlink.new('foo') assert fake_symlink.respond_to?(:to_s, false), 'has public method \#to_s' assert fake_symlink.respond_to?(:to_s, true), 'has public or private method \#to_s' assert !fake_symlink.respond_to?(:initialize, false), 'has private method \#initialize' assert fake_symlink.respond_to?(:initialize, true), 'has private method \#initialize' end def test_symlink_respond_to_uses_same_param_defaults fake_symlink = FakeSymlink.new('foo') assert_equal fake_symlink.respond_to?(:to_s), fake_symlink.entry.respond_to?(:to_s) assert_not_equal fake_symlink.respond_to?(:to_s), fake_symlink.entry.respond_to?(:initialize) assert_equal fake_symlink.respond_to?(:initialize), fake_symlink.entry.respond_to?(:initialize) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fakefs-0.5.4 | test/fake/symlink_test.rb |
fakefs-0.5.3 | test/fake/symlink_test.rb |