rubydoctest 0.2.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,7 +37,7 @@
37
37
  </div>
38
38
  <%= body %>
39
39
  <p class="coda">
40
- <a href="FIXME email">FIXME full name</a>, <%= modified.pretty %><br>
40
+ <a href="mailto:duane.johnson@gmail.com">Duane Johnson</a>, <%= modified.pretty %><br>
41
41
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
42
42
  </p>
43
43
  </div>
metadata CHANGED
@@ -1,21 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubydoctest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Duane Johnson
7
8
  - Tom Locke
8
9
  - Dr Nic Williams
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
13
 
13
- date: 2008-05-26 00:00:00 +10:00
14
+ date: 2008-06-23 00:00:00 -06:00
14
15
  default_executable:
15
16
  dependencies: []
16
17
 
17
18
  description: Ruby version of Python's doctest tool, but a bit different.
18
- email: drnicwilliams@gmail.com
19
+ email: duane.johnson@gmail.com
19
20
  executables:
20
21
  - rubydoctest
21
22
  extensions: []
@@ -34,26 +35,34 @@ files:
34
35
  - PostInstall.txt
35
36
  - README.txt
36
37
  - Rakefile
38
+ - Ruby DocTest.tmproj
37
39
  - bin/rubydoctest
38
40
  - config/hoe.rb
39
41
  - config/requirements.rb
42
+ - lib/code_block.rb
43
+ - lib/doctest_require.rb
44
+ - lib/lines.rb
45
+ - lib/result.rb
40
46
  - lib/rubydoctest.rb
41
47
  - lib/rubydoctest/version.rb
48
+ - lib/runner.rb
49
+ - lib/special_directive.rb
50
+ - lib/statement.rb
51
+ - lib/test.rb
42
52
  - rubydoctest.gemspec
43
53
  - script/console
44
54
  - script/destroy
45
55
  - script/generate
56
+ - script/rstakeout
46
57
  - script/txt2html
47
58
  - setup.rb
48
59
  - tasks/deployment.rake
49
60
  - tasks/doctests.rake
50
61
  - tasks/environment.rake
51
62
  - tasks/website.rake
52
- - test/doctest/file_relative.doctest
53
- - test/doctest/runner.doctest
54
- - test/doctest/simple.doctest
55
- - test/test_helper.rb
56
- - test/test_rubydoctest.rb
63
+ - textmate/DocTest (Markdown).textmate
64
+ - textmate/DocTest (Ruby).textmate
65
+ - textmate/DocTest (Text).textmate
57
66
  - website/index.html
58
67
  - website/index.txt
59
68
  - website/javascripts/rounded_corners_lite.inc.js
@@ -63,10 +72,9 @@ has_rdoc: true
63
72
  homepage: http://rubydoctest.rubyforge.org
64
73
  post_install_message: |+
65
74
 
66
- rubydoctest comes as an executable that takes a file or directory:
75
+ rubydoctest comes as an executable that takes a list of files:
67
76
 
68
- rubydoctest .
69
- rubydoctest some/path/to/tests
77
+ rubydoctest lib/*.rb
70
78
  rubydoctest simple.doctest
71
79
 
72
80
 
@@ -90,10 +98,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
98
  requirements: []
91
99
 
92
100
  rubyforge_project: rubydoctest
93
- rubygems_version: 1.1.1
101
+ rubygems_version: 1.0.1
94
102
  signing_key:
95
103
  specification_version: 2
96
104
  summary: Ruby version of Python's doctest tool, but a bit different.
97
- test_files:
98
- - test/test_helper.rb
99
- - test/test_rubydoctest.rb
105
+ test_files: []
106
+
@@ -1,5 +0,0 @@
1
- Its important that __FILE__ evaluates to the *.doctest file than anything else
2
-
3
- >> !!(__FILE__ =~ %r{file_relative.doctest\Z})
4
- => true
5
-
@@ -1,58 +0,0 @@
1
- Underpinning the RubyDocTest framework is a RubyDocTest::Runner instance.
2
-
3
- >> require File.dirname(__FILE__) + "/../../lib/rubydoctest"
4
-
5
- The Runner parses the contents of *.doctest files under test, specifically it is
6
- passed a String, in RubyDocTest format (a superset of Markdown format), runs
7
- the inline Ruby code and compares it to any "=> expected" results.
8
-
9
- The aggregated results are returned for inspection and display to the user.
10
-
11
- The base case is to evaluate an empty string which should not fail.
12
-
13
- >> runner = RubyDocTest.new("", __FILE__)
14
- >> runner.run_file
15
-
16
- You should also be able to evaluate any Markdown document without failure.
17
-
18
- >>
19
- runner = RubyDocTest.new(<<-MARKDOWN, __FILE__)
20
- This is a markdown document.
21
-
22
- class Person
23
- end
24
-
25
- No special DocTest code in this document
26
- MARKDOWN
27
- >> runner.run_file
28
- => true
29
-
30
- The excitement starts when the document under test includes `>>` sections
31
- containing Ruby code:
32
-
33
- >>
34
- runner = RubyDocTest.new(<<-MARKDOWN, __FILE__)
35
- This is a doctest document.
36
-
37
- >> class Dog; end
38
- >> dog = Dog.new
39
- >> dog.class
40
- => Dog
41
-
42
- The above contains several expression, and one test: `dog.class == Dog`
43
- MARKDOWN
44
- >> runner.run_file
45
- => true
46
-
47
- You can also include code and tests that currently fail:
48
-
49
- >>
50
- runner = RubyDocTest.new(<<-MARKDOWN, __FILE__)
51
- Watch out for bad maths:
52
-
53
- >> 1 + 1
54
- => 3
55
-
56
- MARKDOWN
57
- >> runner.run_file
58
- => false
@@ -1,30 +0,0 @@
1
- # Simple test of RubyDocTest
2
-
3
- This is an example test
4
-
5
- >> 1 + 2
6
- => 3
7
-
8
- Test a some multiline statements
9
-
10
- >>
11
- class Person
12
- attr_accessor :name
13
- end
14
-
15
- >> Person
16
- => Person
17
- >> p = Person.new
18
- >> p.name = "Tom"
19
- >> p.name
20
- => "Tom"
21
-
22
-
23
- >> "a
24
- b"
25
- => "a\nb"
26
-
27
- >> 1 +
28
- ?> 2
29
- => 3
30
-
data/test/test_helper.rb DELETED
@@ -1,2 +0,0 @@
1
- require 'test/unit'
2
- require File.dirname(__FILE__) + '/../lib/rubydoctest'
@@ -1,11 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper.rb'
2
-
3
- class TestRubydoctest < Test::Unit::TestCase
4
-
5
- def setup
6
- end
7
-
8
- def test_truth
9
- assert true
10
- end
11
- end