test/tc_registry.rb in windows-pr-0.7.0 vs test/tc_registry.rb in windows-pr-0.7.1
- old
+ new
@@ -1,34 +1,27 @@
#####################################################################
# tc_registry.rb
#
# Test case for the Windows::Registry module.
#####################################################################
-base = File.basename(Dir.pwd)
-if base == 'test' || base =~ /windows-pr/
- Dir.chdir '..' if base == 'test'
- $LOAD_PATH.unshift Dir.pwd + '/lib'
- Dir.chdir 'test' rescue nil
-end
-
require 'windows/registry'
require 'test/unit'
-class Foo
+class RegistryFoo
include Windows::Registry
end
class TC_Windows_Registry < Test::Unit::TestCase
def setup
- @foo = Foo.new
+ @foo = RegistryFoo.new
end
def test_numeric_constants
- assert_equal(0x80000000, Foo::HKEY_CLASSES_ROOT)
+ assert_equal(0x80000000, RegistryFoo::HKEY_CLASSES_ROOT)
end
def test_method_constants
- assert_not_nil(Foo::RegCloseKey)
+ assert_not_nil(RegistryFoo::RegCloseKey)
end
def teardown
@foo = nil
end