mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/coverage/test_coverage.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9f41782ec8
commit
78b10588bf
1 changed files with 17 additions and 0 deletions
17
test/coverage/test_coverage.rb
Normal file
17
test/coverage/test_coverage.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
require "test/unit"
|
||||
require "coverage"
|
||||
|
||||
class TestCoverage < Test::Unit::TestCase
|
||||
def test_result_without_start
|
||||
assert_raise(RuntimeError) {Coverage.result}
|
||||
end
|
||||
def test_result_with_nothing
|
||||
Coverage.start
|
||||
result = Coverage.result
|
||||
assert_kind_of(Hash, result)
|
||||
result.each do |key, val|
|
||||
assert_kind_of(String, key)
|
||||
assert_kind_of(Array, val)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue