lemon 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.config/cucumber.yml +3 -0
- data/.gitignore +8 -0
- data/.reap/digest +678 -0
- data/.reap/test.reap +7 -0
- data/.ruby +42 -45
- data/Assembly +43 -0
- data/HISTORY.rdoc +10 -0
- data/MANIFEST +65 -0
- data/PROFILE +9 -6
- data/Rakefile +14 -0
- data/VERSION +1 -1
- data/lemon.gemspec +152 -0
- data/lib/lemon.yml +42 -45
- data/lib/lemon/cli.rb +4 -2
- data/lib/lemon/controller/test_runner.rb +4 -0
- data/lib/lemon/model/test_case.rb +122 -40
- data/notes/2010-05-05-coverage.rdoc +47 -0
- data/notes/2010-05-06-files_not_classes.rdoc +19 -0
- data/notes/2010-07-11-acid_testing.rdoc +52 -0
- data/notes/2010-08-02-enforcing-the-unit.md +68 -0
- data/notes/2010-08-03-new-api.md +37 -0
- data/site/.rsync-filter +8 -0
- data/site/assets/images/cut-lemon.png +0 -0
- data/site/assets/images/forkme.png +0 -0
- data/site/assets/images/github-logo.png +0 -0
- data/site/assets/images/lemon.jpg +0 -0
- data/site/assets/images/lemon.svg +39 -0
- data/site/assets/images/lemons-are-good.png +0 -0
- data/site/assets/images/opensource.png +0 -0
- data/site/assets/images/ruby-logo.png +0 -0
- data/site/assets/images/skin.jpg +0 -0
- data/site/assets/images/skin1.jpg +0 -0
- data/site/assets/images/tap.png +0 -0
- data/site/assets/images/title.png +0 -0
- data/site/assets/styles/class.css +6 -0
- data/site/assets/styles/reset.css +17 -0
- data/site/assets/styles/site.css +33 -0
- data/site/index.html +217 -0
- data/work/deprecated/command/abstract.rb +29 -0
- data/work/deprecated/command/coverage.rb +115 -0
- data/work/deprecated/command/generate.rb +124 -0
- data/work/deprecated/command/test.rb +112 -0
- data/work/reference/dsl2.rb +136 -0
- data/work/reference/dynamic_constant_lookup.rb +76 -0
- data/work/sandbox/lib/sample.rb +13 -0
- data/work/sandbox/test/sample_case.rb +12 -0
- data/work/trash/example-cover.rb +5 -0
- data/work/trash/example.rb +16 -0
- metadata +134 -101
- data/.yardopts +0 -7
- data/QED.rdoc +0 -1
data/.reap/test.reap
ADDED
data/.ruby
CHANGED
@@ -1,59 +1,56 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
|
10
|
-
|
1
|
+
---
|
2
|
+
authors:
|
3
|
+
- name: Thomas Sawyer
|
4
|
+
email: transfire@gmail.com
|
5
|
+
copyrights:
|
6
|
+
- holder: Thomas Sawyer
|
7
|
+
year: '2009'
|
8
|
+
license: BSD-2-Clause
|
9
|
+
replacements: []
|
10
|
+
conflicts: []
|
11
|
+
requirements:
|
11
12
|
- name: ae
|
12
|
-
version: 0+
|
13
|
-
group: []
|
14
|
-
|
15
13
|
- name: ansi
|
16
14
|
version: 1.3+
|
17
|
-
group: []
|
18
|
-
|
19
15
|
- name: detroit
|
20
|
-
|
21
|
-
group:
|
16
|
+
groups:
|
22
17
|
- build
|
18
|
+
development: true
|
23
19
|
- name: reap
|
24
|
-
|
25
|
-
group:
|
20
|
+
groups:
|
26
21
|
- build
|
22
|
+
development: true
|
27
23
|
- name: qed
|
28
|
-
|
29
|
-
group:
|
24
|
+
groups:
|
30
25
|
- test
|
26
|
+
development: true
|
31
27
|
- name: cucumber
|
32
|
-
|
33
|
-
group:
|
28
|
+
groups:
|
34
29
|
- test
|
30
|
+
development: true
|
35
31
|
- name: aruba
|
36
|
-
|
37
|
-
group:
|
32
|
+
groups:
|
38
33
|
- test
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
development: true
|
35
|
+
dependencies: []
|
36
|
+
repositories:
|
37
|
+
- uri: git://github.com/proutils/lemon.git
|
38
|
+
scm: git
|
39
|
+
name: origin
|
40
|
+
resources:
|
41
|
+
home: http://rubyworks.github.com/lemon
|
42
|
+
code: http://github.com/rubyworks/lemon
|
43
|
+
load_path:
|
44
|
+
- lib
|
45
|
+
extra:
|
46
|
+
manifest: MANIFEST
|
47
|
+
alternatives: []
|
48
|
+
revision: 0
|
49
|
+
title: Lemon
|
45
50
|
suite: proutils
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
-
|
52
|
-
maintainers: []
|
53
|
-
|
54
|
-
resources:
|
55
|
-
home: http://proutils.github.com/lemon
|
56
|
-
repository: git://github.com/proutils/lemon.git
|
57
|
-
repositories: {}
|
58
|
-
|
59
|
-
spec_version: 1.0.0
|
51
|
+
summary: Pucker-tight Unit Testing
|
52
|
+
description: Lemon is a unit testing framework that tightly correlates class to test
|
53
|
+
case and method to test unit.
|
54
|
+
version: 0.8.5
|
55
|
+
name: lemon
|
56
|
+
date: '2011-07-16'
|
data/Assembly
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
email:
|
3
|
+
service : Email
|
4
|
+
file : ~
|
5
|
+
subject : ~
|
6
|
+
mailto :
|
7
|
+
- ruby-talk@ruby-lang.org
|
8
|
+
- rubyworks-mailinglist@googlegroups.com
|
9
|
+
#parts : [readme]
|
10
|
+
active : true
|
11
|
+
|
12
|
+
gem:
|
13
|
+
active : true
|
14
|
+
|
15
|
+
github: {}
|
16
|
+
|
17
|
+
dnote:
|
18
|
+
labels : ~
|
19
|
+
output : log/DNOTE.rdoc
|
20
|
+
|
21
|
+
yard:
|
22
|
+
yardopts: true
|
23
|
+
priority: 2
|
24
|
+
|
25
|
+
qedoc:
|
26
|
+
title: Lemony Testing
|
27
|
+
output: QED.rdoc
|
28
|
+
|
29
|
+
cucumber:
|
30
|
+
service : Custom
|
31
|
+
test : |
|
32
|
+
system 'cucumber -q -f progress test/cli'
|
33
|
+
|
34
|
+
lemon:
|
35
|
+
service : Custom
|
36
|
+
test : |
|
37
|
+
system 'lemon -Itest/fixtures test/*.rb'
|
38
|
+
|
39
|
+
vclog:
|
40
|
+
output :
|
41
|
+
- log/AHISTORY.rdoc
|
42
|
+
- log/CHANGELOG.rdoc
|
43
|
+
|
data/HISTORY.rdoc
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
= RELEASE HISTORY
|
2
2
|
|
3
|
+
== 0.8.5 / 2011-07-15
|
4
|
+
|
5
|
+
This release fixes exit code status, which should be -1 if there
|
6
|
+
are errors or failures.
|
7
|
+
|
8
|
+
Changes:
|
9
|
+
|
10
|
+
* Fix exit code status.
|
11
|
+
|
12
|
+
|
3
13
|
== 0.8.4 / 2011-07-11
|
4
14
|
|
5
15
|
Fix reported issue #6 to get lemon passing it own tests. (Note: the
|
data/MANIFEST
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
#!mast .yardopts .ruby bin demo features lib man qed spec test [A-Z][A-Z]*
|
2
|
+
.yardopts
|
3
|
+
.ruby
|
4
|
+
bin/lemon
|
5
|
+
demo/case_example_error.rb
|
6
|
+
demo/case_example_fail.rb
|
7
|
+
demo/case_example_pass.rb
|
8
|
+
demo/case_example_pending.rb
|
9
|
+
demo/case_example_untested.rb
|
10
|
+
demo/fixture/example-use.rb
|
11
|
+
demo/fixture/example.rb
|
12
|
+
features/coverage.feature
|
13
|
+
features/generate.feature
|
14
|
+
features/step_definitions/coverage_steps.rb
|
15
|
+
features/support/ae.rb
|
16
|
+
features/support/aruba.rb
|
17
|
+
features/test.feature
|
18
|
+
lib/lemon/cli.rb
|
19
|
+
lib/lemon/controller/coverage_analyzer.rb
|
20
|
+
lib/lemon/controller/scaffold_generator.rb
|
21
|
+
lib/lemon/controller/test_runner.rb
|
22
|
+
lib/lemon/model/ae.rb
|
23
|
+
lib/lemon/model/cover_unit.rb
|
24
|
+
lib/lemon/model/main.rb
|
25
|
+
lib/lemon/model/pending.rb
|
26
|
+
lib/lemon/model/snapshot.rb
|
27
|
+
lib/lemon/model/source_parser.rb
|
28
|
+
lib/lemon/model/test_case.rb
|
29
|
+
lib/lemon/model/test_context.rb
|
30
|
+
lib/lemon/model/test_suite.rb
|
31
|
+
lib/lemon/model/test_unit.rb
|
32
|
+
lib/lemon/view/cover_reports/abstract.rb
|
33
|
+
lib/lemon/view/cover_reports/compact.rb
|
34
|
+
lib/lemon/view/cover_reports/outline.rb
|
35
|
+
lib/lemon/view/cover_reports/verbose.rb
|
36
|
+
lib/lemon/view/cover_reports/yaml.rb
|
37
|
+
lib/lemon/view/test_reports/abstract.rb
|
38
|
+
lib/lemon/view/test_reports/dotprogress.rb
|
39
|
+
lib/lemon/view/test_reports/html.rb
|
40
|
+
lib/lemon/view/test_reports/outline.rb
|
41
|
+
lib/lemon/view/test_reports/summary.rb
|
42
|
+
lib/lemon/view/test_reports/tap.rb
|
43
|
+
lib/lemon/view/test_reports/tapj.rb
|
44
|
+
lib/lemon/view/test_reports/tapy.rb
|
45
|
+
lib/lemon/view/test_reports/verbose.rb
|
46
|
+
lib/lemon.rb
|
47
|
+
lib/lemon.yml
|
48
|
+
qed/applique/fs.rb
|
49
|
+
qed/coverage/01_complete.rdoc
|
50
|
+
qed/coverage/02_incomplete.rdoc
|
51
|
+
qed/coverage/03_extensions.rdoc
|
52
|
+
test/case_coverage_analyzer.rb
|
53
|
+
test/case_test_case_dsl.rb
|
54
|
+
test/fixtures/case_complete.rb
|
55
|
+
test/fixtures/case_inclusion.rb
|
56
|
+
test/fixtures/case_incomplete.rb
|
57
|
+
test/fixtures/example.rb
|
58
|
+
test/fixtures/helper.rb
|
59
|
+
test/runner
|
60
|
+
HISTORY.rdoc
|
61
|
+
PROFILE
|
62
|
+
README.rdoc
|
63
|
+
QED.rdoc
|
64
|
+
VERSION
|
65
|
+
COPYING.rdoc
|
data/PROFILE
CHANGED
@@ -2,21 +2,24 @@
|
|
2
2
|
title : Lemon
|
3
3
|
suite : proutils
|
4
4
|
summary: Pucker-tight Unit Testing
|
5
|
-
authors:
|
6
|
-
|
7
|
-
license: Apache 2.0
|
5
|
+
authors:
|
6
|
+
- Thomas Sawyer <transfire@gmail.com>
|
8
7
|
|
9
8
|
description:
|
10
9
|
Lemon is a unit testing framework that tightly correlates
|
11
10
|
class to test case and method to test unit.
|
12
11
|
|
13
12
|
resources:
|
14
|
-
|
15
|
-
|
13
|
+
home: http://rubyworks.github.com/lemon
|
14
|
+
code: http://github.com/rubyworks/lemon
|
15
|
+
|
16
|
+
repositories:
|
17
|
+
origin: git://github.com/proutils/lemon.git
|
16
18
|
|
17
19
|
copyright: Copyright 2009 Thomas Sawyer
|
20
|
+
license: BSD-2-Clause
|
18
21
|
|
19
|
-
|
22
|
+
requirements:
|
20
23
|
- ae
|
21
24
|
- ansi 1.3+
|
22
25
|
- detroit (build)
|
data/Rakefile
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.5
|
data/lemon.gemspec
ADDED
@@ -0,0 +1,152 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
|
5
|
+
Gem::Specification.new do |gemspec|
|
6
|
+
|
7
|
+
manifest = Dir.glob('manifest{,.txt)', File::FNM_CASEFOLD).first
|
8
|
+
|
9
|
+
scm = case
|
10
|
+
when File.directory?('.git')
|
11
|
+
:git
|
12
|
+
end
|
13
|
+
|
14
|
+
files = case
|
15
|
+
when manifest
|
16
|
+
File.readlines(manifest).
|
17
|
+
map{ |line| line.srtip }.
|
18
|
+
reject{ |line| line.empty? || line[0,1] == '#' }
|
19
|
+
when scm == :git
|
20
|
+
`git ls-files -z`.split("\0")
|
21
|
+
else
|
22
|
+
Dir.glob('{**/}{.*,*}') # TODO: be more specific using standard locations ?
|
23
|
+
end.select{ |path| File.file?(path) }
|
24
|
+
|
25
|
+
patterns = {
|
26
|
+
:bin_files => 'bin/*',
|
27
|
+
:lib_files => 'lib/{**/}*.rb',
|
28
|
+
:ext_files => 'ext/{**/}extconf.rb',
|
29
|
+
:doc_files => '*.{txt,rdoc,md,markdown,tt,textile}',
|
30
|
+
:test_files => '{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'
|
31
|
+
}
|
32
|
+
|
33
|
+
glob_files = lambda { |pattern|
|
34
|
+
Dir.glob(pattern).select { |path|
|
35
|
+
File.file?(path) && files.include?(path)
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
39
|
+
#files = glob_files[patterns[:files]]
|
40
|
+
|
41
|
+
executables = glob_files[patterns[:bin_files]].map do |path|
|
42
|
+
File.basename(path)
|
43
|
+
end
|
44
|
+
|
45
|
+
extensions = glob_files[patterns[:ext_files]].map do |path|
|
46
|
+
File.basename(path)
|
47
|
+
end
|
48
|
+
|
49
|
+
metadata = YAML.load_file('.ruby')
|
50
|
+
|
51
|
+
# build-out the gemspec
|
52
|
+
|
53
|
+
case metadata['revision']
|
54
|
+
when 0
|
55
|
+
gemspec.name = metadata['name']
|
56
|
+
gemspec.version = metadata['version']
|
57
|
+
gemspec.summary = metadata['summary']
|
58
|
+
gemspec.description = metadata['description']
|
59
|
+
|
60
|
+
metadata['authors'].each do |author|
|
61
|
+
gemspec.authors << author['name']
|
62
|
+
|
63
|
+
if author.has_key?('email')
|
64
|
+
if gemspec.email
|
65
|
+
gemspec.email << author['email']
|
66
|
+
else
|
67
|
+
gemspec.email = [author['email']]
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
gemspec.licenses = metadata['licenses']
|
73
|
+
|
74
|
+
metadata['requirements'].each do |req|
|
75
|
+
name = req['name']
|
76
|
+
version = req['version']
|
77
|
+
groups = req['groups'] || []
|
78
|
+
|
79
|
+
if md = /^(.*?)([+-~])$/.match(version)
|
80
|
+
version = case md[2]
|
81
|
+
when '+' then ">= #{$1}"
|
82
|
+
when '-' then "< #{$1}"
|
83
|
+
when '~' then "~> #{$1}"
|
84
|
+
else version
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
#development = req['development']
|
89
|
+
#if development
|
90
|
+
# # populate development dependencies
|
91
|
+
# if gemspec.respond_to?(:add_development_dependency)
|
92
|
+
# gemspec.add_development_dependency(name,*version)
|
93
|
+
# else
|
94
|
+
# gemspec.add_dependency(name,*version)
|
95
|
+
# end
|
96
|
+
#else
|
97
|
+
# # populate runtime dependencies
|
98
|
+
# if gemspec.respond_to?(:add_runtime_dependency)
|
99
|
+
# gemspec.add_runtime_dependency(name,*version)
|
100
|
+
# else
|
101
|
+
# gemspec.add_dependency(name,*version)
|
102
|
+
# end
|
103
|
+
#end
|
104
|
+
|
105
|
+
if groups.empty? or groups.include?('runtime')
|
106
|
+
# populate runtime dependencies
|
107
|
+
if gemspec.respond_to?(:add_runtime_dependency)
|
108
|
+
gemspec.add_runtime_dependency(name,*version)
|
109
|
+
else
|
110
|
+
gemspec.add_dependency(name,*version)
|
111
|
+
end
|
112
|
+
else
|
113
|
+
# populate development dependencies
|
114
|
+
if gemspec.respond_to?(:add_development_dependency)
|
115
|
+
gemspec.add_development_dependency(name,*version)
|
116
|
+
else
|
117
|
+
gemspec.add_dependency(name,*version)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
# convert external dependencies into a requirements
|
123
|
+
if metadata['external_dependencies']
|
124
|
+
##gemspec.requirements = [] unless metadata['external_dependencies'].empty?
|
125
|
+
metadata['external_dependencies'].each do |req|
|
126
|
+
gemspec.requirements << req.to_s
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
# determine homepage from resources
|
131
|
+
homepage = metadata['resources'].find{ |key, url| key =~ /^home/ }
|
132
|
+
gemspec.homepage = homepage.last if homepage
|
133
|
+
|
134
|
+
gemspec.require_paths = metadata['load_path'] || ['lib']
|
135
|
+
gemspec.post_install_message = metadata['install_message']
|
136
|
+
|
137
|
+
# RubyGems specific metadata
|
138
|
+
gemspec.files = files
|
139
|
+
gemspec.extensions = extensions
|
140
|
+
gemspec.executables = executables
|
141
|
+
|
142
|
+
if Gem::VERSION < '1.7.'
|
143
|
+
gemspec.default_executable = gemspec.executables.first
|
144
|
+
end
|
145
|
+
|
146
|
+
gemspec.test_files = glob_files[patterns[:test_files]]
|
147
|
+
|
148
|
+
unless gemspec.files.include?('.document')
|
149
|
+
gemspec.extra_rdoc_files = glob_files[patterns[:doc_files]]
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
data/lib/lemon.yml
CHANGED
@@ -1,59 +1,56 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
-
|
9
|
-
|
10
|
-
|
1
|
+
---
|
2
|
+
authors:
|
3
|
+
- name: Thomas Sawyer
|
4
|
+
email: transfire@gmail.com
|
5
|
+
copyrights:
|
6
|
+
- holder: Thomas Sawyer
|
7
|
+
year: '2009'
|
8
|
+
license: BSD-2-Clause
|
9
|
+
replacements: []
|
10
|
+
conflicts: []
|
11
|
+
requirements:
|
11
12
|
- name: ae
|
12
|
-
version: 0+
|
13
|
-
group: []
|
14
|
-
|
15
13
|
- name: ansi
|
16
14
|
version: 1.3+
|
17
|
-
group: []
|
18
|
-
|
19
15
|
- name: detroit
|
20
|
-
|
21
|
-
group:
|
16
|
+
groups:
|
22
17
|
- build
|
18
|
+
development: true
|
23
19
|
- name: reap
|
24
|
-
|
25
|
-
group:
|
20
|
+
groups:
|
26
21
|
- build
|
22
|
+
development: true
|
27
23
|
- name: qed
|
28
|
-
|
29
|
-
group:
|
24
|
+
groups:
|
30
25
|
- test
|
26
|
+
development: true
|
31
27
|
- name: cucumber
|
32
|
-
|
33
|
-
group:
|
28
|
+
groups:
|
34
29
|
- test
|
30
|
+
development: true
|
35
31
|
- name: aruba
|
36
|
-
|
37
|
-
group:
|
32
|
+
groups:
|
38
33
|
- test
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
development: true
|
35
|
+
dependencies: []
|
36
|
+
repositories:
|
37
|
+
- uri: git://github.com/proutils/lemon.git
|
38
|
+
scm: git
|
39
|
+
name: origin
|
40
|
+
resources:
|
41
|
+
home: http://rubyworks.github.com/lemon
|
42
|
+
code: http://github.com/rubyworks/lemon
|
43
|
+
load_path:
|
44
|
+
- lib
|
45
|
+
extra:
|
46
|
+
manifest: MANIFEST
|
47
|
+
alternatives: []
|
48
|
+
revision: 0
|
49
|
+
title: Lemon
|
45
50
|
suite: proutils
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
-
|
52
|
-
maintainers: []
|
53
|
-
|
54
|
-
resources:
|
55
|
-
home: http://proutils.github.com/lemon
|
56
|
-
repository: git://github.com/proutils/lemon.git
|
57
|
-
repositories: {}
|
58
|
-
|
59
|
-
spec_version: 1.0.0
|
51
|
+
summary: Pucker-tight Unit Testing
|
52
|
+
description: Lemon is a unit testing framework that tightly correlates class to test
|
53
|
+
case and method to test unit.
|
54
|
+
version: 0.8.5
|
55
|
+
name: lemon
|
56
|
+
date: '2011-07-16'
|