test 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- metadata +36 -112
- data/.gemspec +0 -152
- data/.gitignore +0 -7
- data/.ruby +0 -46
- data/.test +0 -11
- data/.yardopts +0 -7
- data/Assembly +0 -46
- data/COPYING.rdoc +0 -31
- data/HISTORY.md +0 -29
- data/LICENSE.txt +0 -25
- data/MANIFEST +0 -37
- data/PROFILE +0 -31
- data/README.md +0 -110
- data/VERSION +0 -1
- data/bin/ruby-test +0 -4
- data/lib/test.rb +0 -3
- data/lib/test/autorun.rb +0 -18
- data/lib/test/cli.rb +0 -110
- data/lib/test/code_snippet.rb +0 -93
- data/lib/test/config.rb +0 -72
- data/lib/test/core_ext.rb +0 -9
- data/lib/test/core_ext/assertion.rb +0 -30
- data/lib/test/core_ext/exception.rb +0 -8
- data/lib/test/core_ext/string.rb +0 -30
- data/lib/test/rake.rb +0 -124
- data/lib/test/recorder.rb +0 -53
- data/lib/test/reporters/abstract.rb +0 -268
- data/lib/test/reporters/abstract_hash.rb +0 -224
- data/lib/test/reporters/dotprogress.rb +0 -89
- data/lib/test/reporters/html.rb +0 -155
- data/lib/test/reporters/outline.rb +0 -211
- data/lib/test/reporters/progress.rb +0 -197
- data/lib/test/reporters/summary.rb +0 -145
- data/lib/test/reporters/tap.rb +0 -61
- data/lib/test/reporters/tapj.rb +0 -53
- data/lib/test/reporters/tapy.rb +0 -53
- data/lib/test/reporters/test.rb +0 -51
- data/lib/test/runner.rb +0 -342
- data/site/assets/images/test_pattern.jpg +0 -0
- data/site/index.html +0 -77
- data/spec/01_test.md +0 -29
- data/spec/02_case.md +0 -34
- data/spec/applique/ruby-test.rb +0 -2
- data/test/basic_case.rb +0 -11
- data/try/raw_example.rb +0 -41
- data/work/NOTES.md +0 -17
Binary file
|
data/site/index.html
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Ruby Test</title>
|
4
|
-
<style>
|
5
|
-
html { font-family: sans-serif; }
|
6
|
-
body { margin: 0; padding: 0; }
|
7
|
-
a { text-decoration: none; color: #ddd; padding: 5px 10px; }
|
8
|
-
a:hover { color: #fff; }
|
9
|
-
|
10
|
-
#main { background: url(assets/images/test_pattern.jpg) top no-repeat; height: 780px;
|
11
|
-
position: relative; margin: 10px 0; padding: 0; }
|
12
|
-
|
13
|
-
#line { width: 100%; color: #cc2222; font-size: 72px; text-align: center;
|
14
|
-
background: red; font-weight: bold; opacity: 0.9; font-family: times; }
|
15
|
-
|
16
|
-
#footer {
|
17
|
-
width: 1024px; margin: 10px auto; text-align: center;
|
18
|
-
}
|
19
|
-
|
20
|
-
#footer a { color: red; font-size: 1.5em; }
|
21
|
-
#footer a:hover { color: black; }
|
22
|
-
|
23
|
-
.copyright { color: #555; }
|
24
|
-
</style>
|
25
|
-
</head>
|
26
|
-
<body>
|
27
|
-
|
28
|
-
<div id="main">
|
29
|
-
<div style="height: 340px;"></div>
|
30
|
-
|
31
|
-
<div id="line">
|
32
|
-
<a href="http://github.com/rubyworks/test/wiki">
|
33
|
-
RUBY UNIVERSAL TEST HARNESS
|
34
|
-
</a>
|
35
|
-
</div>
|
36
|
-
</div>
|
37
|
-
|
38
|
-
<div id="footer">
|
39
|
-
<div class="nav">
|
40
|
-
<a href="http://wiki.github.com/rubyworks/test">User Guide</a>
|
41
|
-
<a href="http://rubyinfo.org/gems/test">API Reference</a>
|
42
|
-
<a href="http://github.com/rubyworks/test">Development</a>
|
43
|
-
<div>
|
44
|
-
|
45
|
-
<div style="margin: 40px 0;">
|
46
|
-
<script type="text/javascript"><!--
|
47
|
-
google_ad_client = "ca-pub-1126154564663472";
|
48
|
-
/* RUBYWORKS 09-10-02 728x90 */
|
49
|
-
google_ad_slot = "0788888658";
|
50
|
-
google_ad_width = 728;
|
51
|
-
google_ad_height = 90;
|
52
|
-
//-->
|
53
|
-
</script>
|
54
|
-
<script type="text/javascript"
|
55
|
-
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
56
|
-
</script>
|
57
|
-
</div>
|
58
|
-
|
59
|
-
<div class="copyright">
|
60
|
-
Copyright (c) 2011 TRANS, RubyWorks · FreeBSD License
|
61
|
-
<div>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<div style="position: absolute; top: 0; right: 0;">
|
65
|
-
<a href="http://github.com/rubyworks/ae">
|
66
|
-
<img src="http://rubyworks.github.com/assets/images/fork-me.png" />
|
67
|
-
</a>
|
68
|
-
</div>
|
69
|
-
|
70
|
-
<div id="rubyworks" style="position: fixed; bottom: 5px; right: 10px; padding: 0; opacity: 0.3;">
|
71
|
-
<a href="http://rubyworks.github.com">
|
72
|
-
<img src="http://rubyworks.github.com/assets/images/seal.png" height="150px" />
|
73
|
-
</a>
|
74
|
-
</div>
|
75
|
-
|
76
|
-
</body>
|
77
|
-
</html>
|
data/spec/01_test.md
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
## Defining a Test
|
2
|
-
|
3
|
-
Any object in a test suite that responds to #call, will be executed as
|
4
|
-
a test. For instance, given an abtriray object defined as follows.
|
5
|
-
|
6
|
-
test = Object.new
|
7
|
-
|
8
|
-
def test.okay
|
9
|
-
@okay
|
10
|
-
end
|
11
|
-
|
12
|
-
def test.call
|
13
|
-
@okay = true
|
14
|
-
end
|
15
|
-
|
16
|
-
If we pass this to a test runner as part of a test suite,
|
17
|
-
|
18
|
-
runner = Test::Runner.new(:suite=>[test], :format=>'test')
|
19
|
-
|
20
|
-
success = runner.run
|
21
|
-
|
22
|
-
We will see that the test was called.
|
23
|
-
|
24
|
-
test.assert.okay
|
25
|
-
|
26
|
-
And testing was successful.
|
27
|
-
|
28
|
-
success.assert == true
|
29
|
-
|
data/spec/02_case.md
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
## Defining a Test Case
|
2
|
-
|
3
|
-
Any object in a test suite that responds to #each, will be iterated over
|
4
|
-
and each entry run a test or another sub-case. For instance, given an abitrary
|
5
|
-
object defined as follows.
|
6
|
-
|
7
|
-
test = Object.new
|
8
|
-
|
9
|
-
def test.okay
|
10
|
-
@okay
|
11
|
-
end
|
12
|
-
|
13
|
-
def test.call
|
14
|
-
@okay = true
|
15
|
-
end
|
16
|
-
|
17
|
-
And placed into an array.
|
18
|
-
|
19
|
-
tests = [test]
|
20
|
-
|
21
|
-
If we pass this to a test runner as part of a test suite,
|
22
|
-
|
23
|
-
runner = Test::Runner.new(:suite=>[tests], :format=>'test')
|
24
|
-
|
25
|
-
success = runner.run
|
26
|
-
|
27
|
-
We will see that the test was called.
|
28
|
-
|
29
|
-
test.assert.okay
|
30
|
-
|
31
|
-
And testing was successful.
|
32
|
-
|
33
|
-
success.assert == true
|
34
|
-
|
data/spec/applique/ruby-test.rb
DELETED
data/test/basic_case.rb
DELETED
data/try/raw_example.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
class RawTest
|
2
|
-
def initialize(label, &block)
|
3
|
-
@label = label
|
4
|
-
@block = block
|
5
|
-
end
|
6
|
-
def to_s
|
7
|
-
@label.to_s
|
8
|
-
end
|
9
|
-
def call
|
10
|
-
@block.call
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
# pass
|
15
|
-
$TEST_SUITE << RawTest.new("all good")do
|
16
|
-
end
|
17
|
-
|
18
|
-
# fail
|
19
|
-
$TEST_SUITE << RawTest.new("not so good")do
|
20
|
-
e = SyntaxError.new("failure is not an option")
|
21
|
-
e.set_assertion(true)
|
22
|
-
raise e
|
23
|
-
end
|
24
|
-
|
25
|
-
# error
|
26
|
-
$TEST_SUITE << RawTest.new("not good at all") do
|
27
|
-
raise "example error"
|
28
|
-
end
|
29
|
-
|
30
|
-
# todo
|
31
|
-
$TEST_SUITE << RawTest.new("it will be done") do
|
32
|
-
raise NotImplementedError, "but we're not there yet"
|
33
|
-
end
|
34
|
-
|
35
|
-
# omit
|
36
|
-
$TEST_SUITE << RawTest.new("forget about it") do
|
37
|
-
e = NotImplementedError.new("it just can't be done")
|
38
|
-
e.set_assertion(true)
|
39
|
-
raise e
|
40
|
-
end
|
41
|
-
|
data/work/NOTES.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Developer's Notes
|
2
|
-
|
3
|
-
The original specification utilized an `Assertion` base class, defined as
|
4
|
-
`class Assertion < Exception; end`, to distinguish assertion failures from
|
5
|
-
regular exceptions. All test frameworks (AFAIK) have some variation of this
|
6
|
-
class, e.g. Test::Unit has `FailureError`. For this to work, it would be
|
7
|
-
necessary for all such classes to inherit from the common `Assertion` class.
|
8
|
-
While likely not difficult to implement, it was determined that utilizing a
|
9
|
-
common `#assertion` method was more flexible and easier for test frameworks
|
10
|
-
to support.
|
11
|
-
|
12
|
-
Test/Unit provides for _notifications_. Support for notifications is something
|
13
|
-
to consider for a future version.
|
14
|
-
|
15
|
-
Feedback on any of these consideration is greatly appreciated. Just
|
16
|
-
post up an new [issue](http://rubyworks.github/test/issues).
|
17
|
-
|