lemon 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY.rdoc +15 -0
- data/README.rdoc +32 -14
- data/bin/lemon +3 -2
- data/demo/case_example_fail.rb +15 -0
- data/demo/case_example_pass.rb +32 -0
- data/demo/case_example_pending.rb +14 -0
- data/demo/case_example_untested.rb +10 -0
- data/demo/fixture/example-use.rb +5 -0
- data/demo/fixture/example.rb +20 -0
- data/lib/lemon.rb +2 -2
- data/lib/lemon/cli.rb +281 -0
- data/lib/lemon/controller/coverage_analyzer.rb +343 -0
- data/lib/lemon/controller/scaffold_generator.rb +110 -0
- data/lib/lemon/controller/test_runner.rb +284 -0
- data/lib/lemon/meta/data.rb +29 -0
- data/lib/lemon/meta/gemfile +24 -0
- data/{PROFILE → lib/lemon/meta/profile} +6 -5
- data/lib/lemon/model/ae.rb +4 -0
- data/lib/lemon/model/cover_unit.rb +75 -0
- data/lib/lemon/{dsl.rb → model/main.rb} +22 -28
- data/lib/lemon/model/pending.rb +10 -0
- data/lib/lemon/model/snapshot.rb +203 -0
- data/lib/lemon/model/source_parser.rb +198 -0
- data/lib/lemon/model/test_case.rb +221 -0
- data/lib/lemon/model/test_context.rb +90 -0
- data/lib/lemon/model/test_suite.rb +216 -0
- data/lib/lemon/{test/unit.rb → model/test_unit.rb} +40 -28
- data/lib/lemon/{coversheet → view/cover_reports}/abstract.rb +19 -20
- data/lib/lemon/view/cover_reports/compact.rb +37 -0
- data/lib/lemon/view/cover_reports/outline.rb +45 -0
- data/lib/lemon/view/cover_reports/verbose.rb +51 -0
- data/lib/lemon/view/cover_reports/yaml.rb +15 -0
- data/lib/lemon/view/test_reports/abstract.rb +149 -0
- data/lib/lemon/view/test_reports/dotprogress.rb +73 -0
- data/lib/lemon/view/test_reports/html.rb +146 -0
- data/lib/lemon/view/test_reports/outline.rb +118 -0
- data/lib/lemon/view/test_reports/summary.rb +131 -0
- data/lib/lemon/view/test_reports/tap.rb +49 -0
- data/lib/lemon/view/test_reports/verbose.rb +197 -0
- data/meta/data.rb +29 -0
- data/meta/gemfile +24 -0
- data/meta/profile +17 -0
- data/test/api/applique/fs.rb +18 -0
- data/test/api/coverage/complete.rdoc +136 -0
- data/test/api/coverage/extensions.rdoc +61 -0
- data/test/api/coverage/incomplete.rdoc +97 -0
- data/{features → test/cli}/coverage.feature +4 -4
- data/{features → test/cli}/generate.feature +2 -2
- data/{features → test/cli}/step_definitions/coverage_steps.rb +0 -0
- data/{features → test/cli}/support/ae.rb +0 -0
- data/{features → test/cli}/support/aruba.rb +0 -0
- data/{features → test/cli}/test.feature +0 -0
- data/test/fixtures/case_complete.rb +17 -4
- data/test/fixtures/case_inclusion.rb +18 -0
- data/test/fixtures/case_incomplete.rb +4 -4
- data/test/fixtures/example.rb +5 -0
- data/test/fixtures/helper.rb +13 -0
- data/test/runner +3 -0
- data/test/unit/case_coverage_analyzer.rb +25 -0
- data/test/unit/case_test_case_dsl.rb +46 -0
- metadata +87 -42
- data/REQUIRE +0 -9
- data/VERSION +0 -6
- data/lib/lemon/command.rb +0 -184
- data/lib/lemon/coverage.rb +0 -260
- data/lib/lemon/coversheet/outline.rb +0 -47
- data/lib/lemon/kernel.rb +0 -24
- data/lib/lemon/reporter.rb +0 -22
- data/lib/lemon/reporter/abstract.rb +0 -97
- data/lib/lemon/reporter/dotprogress.rb +0 -68
- data/lib/lemon/reporter/outline.rb +0 -105
- data/lib/lemon/reporter/verbose.rb +0 -143
- data/lib/lemon/runner.rb +0 -308
- data/lib/lemon/snapshot.rb +0 -185
- data/lib/lemon/test/case.rb +0 -139
- data/lib/lemon/test/concern.rb +0 -52
- data/lib/lemon/test/suite.rb +0 -229
- data/test/case_coverage.rb +0 -26
- data/test/case_testcase.rb +0 -58
data/test/case_coverage.rb
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
Covers 'lemon/coverage'
|
2
|
-
|
3
|
-
TestCase Lemon::Coverage do
|
4
|
-
|
5
|
-
#Before /returns/ do |unit|
|
6
|
-
# puts "returns something"
|
7
|
-
#end
|
8
|
-
|
9
|
-
Unit :coverage => 'returns a chart of coverage' do
|
10
|
-
#X.new.a.assert.is_a?(String)
|
11
|
-
end
|
12
|
-
|
13
|
-
Unit :cover => 'returns a pre-checked chart of potential coverage' do
|
14
|
-
#X.new.a.assert =~ /^[a-z]*$/
|
15
|
-
end
|
16
|
-
|
17
|
-
Unit :system => 'returns a list of classes/modules currently in the Ruby proccess' do
|
18
|
-
#1.assert == 4
|
19
|
-
end
|
20
|
-
|
21
|
-
#unit :snapshot => 'can be broken' do
|
22
|
-
# #1.assert == 4
|
23
|
-
#end
|
24
|
-
|
25
|
-
end
|
26
|
-
|
data/test/case_testcase.rb
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
# Some fixture code for testing #include.
|
2
|
-
module M
|
3
|
-
def m1; "m1"; end
|
4
|
-
module N
|
5
|
-
def self.n1; "n1"; end
|
6
|
-
end
|
7
|
-
end
|
8
|
-
|
9
|
-
TestCase Lemon::Test::Case do
|
10
|
-
|
11
|
-
Concern "Modules included in a test case are accessible by the unit tests."
|
12
|
-
|
13
|
-
include M
|
14
|
-
#N = M::N
|
15
|
-
|
16
|
-
Unit :include => "allows access to module methods" do
|
17
|
-
m1.assert == "m1"
|
18
|
-
end
|
19
|
-
|
20
|
-
Unit :include => "allows access to nested modules" do
|
21
|
-
N::n1.assert == "n1"
|
22
|
-
end
|
23
|
-
|
24
|
-
|
25
|
-
Concern "Unit tests are augmented by before and after procedures."
|
26
|
-
|
27
|
-
Before /pre-test/ do |unit|
|
28
|
-
@check_before = :before
|
29
|
-
end
|
30
|
-
|
31
|
-
After /pre-test/ do |unit|
|
32
|
-
@check_after = :after
|
33
|
-
end
|
34
|
-
|
35
|
-
Unit :Before => "sets up a pre-test procedure" do
|
36
|
-
@check_before.assert == :before
|
37
|
-
end
|
38
|
-
|
39
|
-
Unit :After => "sets up a post-test procedure" do
|
40
|
-
@check_after.assert == :after
|
41
|
-
end
|
42
|
-
|
43
|
-
|
44
|
-
#Concern "Unit tests are augmented by when procedures.",
|
45
|
-
# "(NOTE: we have to repeat this concern in order to test it.)"
|
46
|
-
|
47
|
-
When /augmented\ by\ when\ procedures/ do
|
48
|
-
@check_concern = :concern
|
49
|
-
end
|
50
|
-
|
51
|
-
Concern "Unit tests are augmented by when procedures."
|
52
|
-
|
53
|
-
Unit :Concern => "sets up a concern procedure" do
|
54
|
-
@check_concern.assert == :concern
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
58
|
-
|