Sha256: 00c53808f8de7e764136d00c2ad5a050eb4e0d26d47eb9275d3ba9ddb47287c9
Contents?: true
Size: 1.32 KB
Versions: 2
Compression:
Stored size: 1.32 KB
Contents
# Author:: Masaki Suketa. # Adapted by:: Nathaniel Talbott. # Copyright:: Copyright (c) Masaki Suketa. All rights reserved. # Copyright:: Copyright (c) 2002 Nathaniel Talbott. All rights reserved. # License:: Ruby license. require 'rubyunit' module RUNIT class TestTestSuite < RUNIT::TestCase def setup @testsuite = RUNIT::TestSuite.new @dummy_test = Class.new(RUNIT::TestCase) do def test_foo end def test_bar end end @dummy_empty_test = Class.new(RUNIT::TestCase){} end def test_count_test_cases assert_equal(0, @testsuite.count_test_cases) @testsuite.add(@dummy_empty_test.suite) assert_equal(0, @testsuite.count_test_cases) @testsuite.add(@dummy_test.suite) assert_equal(2, @testsuite.count_test_cases) @testsuite.add(@dummy_test.suite) assert_equal(4, @testsuite.count_test_cases) dummytest_foo = @dummy_test.new('test_foo') @testsuite.add(dummytest_foo) assert_equal(5, @testsuite.count_test_cases) end def test_add @testsuite.add(@dummy_empty_test.suite) assert_equal(0, @testsuite.size) assert_equal(0, @testsuite.count_test_cases) @testsuite.add(@dummy_test.suite) assert_equal(2, @testsuite.size) assert_equal(2, @testsuite.count_test_cases) end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
radiant-1.0.0 | ruby-debug/ruby/1.8/gems/test-unit-1.2.3/test/runit/test_testsuite.rb |
test-unit-1.2.3 | test/runit/test_testsuite.rb |