Skip to content

Commit

Permalink
* test/testunit/collector/test_dir.rb: r15825 made it unnecessary to …
Browse files Browse the repository at this point in the history
…change

  String to Symbol.

* test/testunit/collector/test_objectspace.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
mame committed Jun 19, 2008
1 parent 08837d0 commit 56dda0e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
Fri Jun 20 03:19:39 2008 Yusuke Endoh <mame@tsg.ne.jp>

* test/testunit/collector/test_dir.rb: r15825 made it unnecessary to change
String to Symbol.

* test/testunit/collector/test_objectspace.rb: ditto.

Fri Jun 20 03:14:31 2008 Eric Hodel <drbrain@segment7.net>

* lib/rubygems*, test/rubygems/*: Update to RubyGems 1.1.1 r1784 (pre
Expand Down
2 changes: 1 addition & 1 deletion test/testunit/collector/test_dir.rb
Expand Up @@ -394,7 +394,7 @@ def test_nil_pattern
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

Expand Down
16 changes: 8 additions & 8 deletions test/testunit/collector/test_objectspace.rb
Expand Up @@ -43,8 +43,8 @@ def @object_space.each_object(type)

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
Expand Down Expand Up @@ -81,15 +81,15 @@ def test_filtered_collection
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
Expand Down

0 comments on commit 56dda0e

Please sign in to comment.