Added verify.rb to find gaps in FakeFS
Signed-off-by: Chris Wanstrath <chris@ozmm.org>
This commit is contained in:
parent
98215fe488
commit
95c86560c0
27
test/verify.rb
Normal file
27
test/verify.rb
Normal file
@ -0,0 +1,27 @@
|
||||
# Figure out what's missing from fakefs
|
||||
#
|
||||
# USAGE
|
||||
#
|
||||
# $ ruby test/verify.rb | grep "not implemented"
|
||||
require 'fakefs'
|
||||
require 'test/unit'
|
||||
|
||||
class FakeFSVerifierTest < Test::Unit::TestCase
|
||||
(RealFile.methods - Class.new.methods).each do |name|
|
||||
define_method("test #{name} class method") do
|
||||
assert File.respond_to?(name), "File.#{name} not implemented"
|
||||
end
|
||||
end
|
||||
|
||||
(RealFile.instance_methods - Enumerable.instance_methods).each do |name|
|
||||
define_method("test #{name} instance method") do
|
||||
assert File.instance_methods.include?(name), "File##{name} not implemented"
|
||||
end
|
||||
end
|
||||
|
||||
(RealFileUtils.methods - Class.new.methods).each do |name|
|
||||
define_method("test #{name} module method") do
|
||||
assert FileUtils.respond_to?(name), "FileUtils.#{name} not implemented"
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user