1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ntalbott 2007-03-20 23:29:49 +00:00
parent ed224698b5
commit 25ac9f24fd
3 changed files with 17 additions and 9 deletions

View file

@ -1,3 +1,11 @@
Tue Mar 21 08:20:00 2007 Nathaniel Talbott <ntalbott@ruby-lang.org>
* 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.
Tue Mar 20 22:54:50 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* marshal.c (w_extended): erroneous check condition when dump

View file

@ -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

View file

@ -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