summaryrefslogtreecommitdiff
path: root/test/coverage
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-14 11:59:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-14 11:59:35 +0000
commit78b10588bfbfa8288b57816237d7f0a836a84f44 (patch)
tree65a3bbcb79a8b3b6e89988acfa2a99f7035ba0d3 /test/coverage
parent9f41782ec8170c69598f49c6fedf5e7ca35724a4 (diff)
* test/coverage/test_coverage.rb: added.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/coverage')
-rw-r--r--test/coverage/test_coverage.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/coverage/test_coverage.rb b/test/coverage/test_coverage.rb
new file mode 100644
index 0000000..ace49d3
--- /dev/null
+++ b/test/coverage/test_coverage.rb
@@ -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