summaryrefslogtreecommitdiff
path: root/test/testunit
diff options
context:
space:
mode:
authorntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-20 23:29:49 +0000
committerntalbott <ntalbott@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-03-20 23:29:49 +0000
commit25ac9f24fdcda84e16615dafa868cc0d361492be (patch)
tree076ffdef0450c26b567ee5c4c3d8ef9f8db44ada /test/testunit
parented224698b56a06808c98b1db393eea5b84a20f09 (diff)
* test/testunit/collector/test_dir.rb: Fixed test/unit tests that
were breaking due to Module#public_instance_methods now returning a Symbol instead of a String. * test/testunit/collector/test_objectspace.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/testunit')
-rw-r--r--test/testunit/collector/test_dir.rb2
-rw-r--r--test/testunit/collector/test_objectspace.rb16
2 files changed, 9 insertions, 9 deletions
diff --git a/test/testunit/collector/test_dir.rb b/test/testunit/collector/test_dir.rb
index 99fb3de..3e55469 100644
--- a/test/testunit/collector/test_dir.rb
+++ b/test/testunit/collector/test_dir.rb
@@ -394,7 +394,7 @@ module Test
def test_filtering
expected = TestSuite.new('.')
expected << @t1.suite
- @c.filter = proc{|t| t.method_name == 'test_1a' || t.method_name == 'test_1b'}
+ @c.filter = proc{|t| t.method_name == :test_1a || t.method_name == :test_1b}
assert_equal(expected, @c.collect)
end
diff --git a/test/testunit/collector/test_objectspace.rb b/test/testunit/collector/test_objectspace.rb
index a1532ff..841d354 100644
--- a/test/testunit/collector/test_objectspace.rb
+++ b/test/testunit/collector/test_objectspace.rb
@@ -43,8 +43,8 @@ module Test
def full_suite(name=ObjectSpace::NAME)
expected = TestSuite.new(name)
- expected << (TestSuite.new(@tc1.name) << @tc1.new('test_1') << @tc1.new('test_2'))
- expected << (TestSuite.new(@tc2.name) << @tc2.new('test_0'))
+ expected << (TestSuite.new(@tc1.name) << @tc1.new(:test_1) << @tc1.new(:test_2))
+ expected << (TestSuite.new(@tc2.name) << @tc2.new(:test_0))
end
def empty_suite
@@ -81,15 +81,15 @@ module Test
assert_equal(full_suite, @c.collect)
expected = TestSuite.new(ObjectSpace::NAME)
- expected << (TestSuite.new(@tc1.name) << @tc1.new('test_1'))
- expected << (TestSuite.new(@tc2.name) << @tc2.new('test_0'))
- @c.filter = proc{|test| ['test_1', 'test_0'].include?(test.method_name)}
+ expected << (TestSuite.new(@tc1.name) << @tc1.new(:test_1))
+ expected << (TestSuite.new(@tc2.name) << @tc2.new(:test_0))
+ @c.filter = proc{|test| [:test_1, :test_0].include?(test.method_name)}
assert_equal(expected, @c.collect)
expected = TestSuite.new(ObjectSpace::NAME)
- expected << (TestSuite.new(@tc1.name) << @tc1.new('test_1'))
- expected << (TestSuite.new(@tc2.name) << @tc2.new('test_0'))
- @c.filter = [proc{|t| t.method_name == 'test_1' ? true : nil}, proc{|t| t.method_name == 'test_0' ? true : nil}, proc{false}]
+ expected << (TestSuite.new(@tc1.name) << @tc1.new(:test_1))
+ expected << (TestSuite.new(@tc2.name) << @tc2.new(:test_0))
+ @c.filter = [proc{|t| t.method_name == :test_1 ? true : nil}, proc{|t| t.method_name == :test_0 ? true : nil}, proc{false}]
assert_equal(expected, @c.collect)
end
end