lemon 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/HISTORY.rdoc +15 -0
  2. data/README.rdoc +32 -14
  3. data/bin/lemon +3 -2
  4. data/demo/case_example_fail.rb +15 -0
  5. data/demo/case_example_pass.rb +32 -0
  6. data/demo/case_example_pending.rb +14 -0
  7. data/demo/case_example_untested.rb +10 -0
  8. data/demo/fixture/example-use.rb +5 -0
  9. data/demo/fixture/example.rb +20 -0
  10. data/lib/lemon.rb +2 -2
  11. data/lib/lemon/cli.rb +281 -0
  12. data/lib/lemon/controller/coverage_analyzer.rb +343 -0
  13. data/lib/lemon/controller/scaffold_generator.rb +110 -0
  14. data/lib/lemon/controller/test_runner.rb +284 -0
  15. data/lib/lemon/meta/data.rb +29 -0
  16. data/lib/lemon/meta/gemfile +24 -0
  17. data/{PROFILE → lib/lemon/meta/profile} +6 -5
  18. data/lib/lemon/model/ae.rb +4 -0
  19. data/lib/lemon/model/cover_unit.rb +75 -0
  20. data/lib/lemon/{dsl.rb → model/main.rb} +22 -28
  21. data/lib/lemon/model/pending.rb +10 -0
  22. data/lib/lemon/model/snapshot.rb +203 -0
  23. data/lib/lemon/model/source_parser.rb +198 -0
  24. data/lib/lemon/model/test_case.rb +221 -0
  25. data/lib/lemon/model/test_context.rb +90 -0
  26. data/lib/lemon/model/test_suite.rb +216 -0
  27. data/lib/lemon/{test/unit.rb → model/test_unit.rb} +40 -28
  28. data/lib/lemon/{coversheet → view/cover_reports}/abstract.rb +19 -20
  29. data/lib/lemon/view/cover_reports/compact.rb +37 -0
  30. data/lib/lemon/view/cover_reports/outline.rb +45 -0
  31. data/lib/lemon/view/cover_reports/verbose.rb +51 -0
  32. data/lib/lemon/view/cover_reports/yaml.rb +15 -0
  33. data/lib/lemon/view/test_reports/abstract.rb +149 -0
  34. data/lib/lemon/view/test_reports/dotprogress.rb +73 -0
  35. data/lib/lemon/view/test_reports/html.rb +146 -0
  36. data/lib/lemon/view/test_reports/outline.rb +118 -0
  37. data/lib/lemon/view/test_reports/summary.rb +131 -0
  38. data/lib/lemon/view/test_reports/tap.rb +49 -0
  39. data/lib/lemon/view/test_reports/verbose.rb +197 -0
  40. data/meta/data.rb +29 -0
  41. data/meta/gemfile +24 -0
  42. data/meta/profile +17 -0
  43. data/test/api/applique/fs.rb +18 -0
  44. data/test/api/coverage/complete.rdoc +136 -0
  45. data/test/api/coverage/extensions.rdoc +61 -0
  46. data/test/api/coverage/incomplete.rdoc +97 -0
  47. data/{features → test/cli}/coverage.feature +4 -4
  48. data/{features → test/cli}/generate.feature +2 -2
  49. data/{features → test/cli}/step_definitions/coverage_steps.rb +0 -0
  50. data/{features → test/cli}/support/ae.rb +0 -0
  51. data/{features → test/cli}/support/aruba.rb +0 -0
  52. data/{features → test/cli}/test.feature +0 -0
  53. data/test/fixtures/case_complete.rb +17 -4
  54. data/test/fixtures/case_inclusion.rb +18 -0
  55. data/test/fixtures/case_incomplete.rb +4 -4
  56. data/test/fixtures/example.rb +5 -0
  57. data/test/fixtures/helper.rb +13 -0
  58. data/test/runner +3 -0
  59. data/test/unit/case_coverage_analyzer.rb +25 -0
  60. data/test/unit/case_test_case_dsl.rb +46 -0
  61. metadata +87 -42
  62. data/REQUIRE +0 -9
  63. data/VERSION +0 -6
  64. data/lib/lemon/command.rb +0 -184
  65. data/lib/lemon/coverage.rb +0 -260
  66. data/lib/lemon/coversheet/outline.rb +0 -47
  67. data/lib/lemon/kernel.rb +0 -24
  68. data/lib/lemon/reporter.rb +0 -22
  69. data/lib/lemon/reporter/abstract.rb +0 -97
  70. data/lib/lemon/reporter/dotprogress.rb +0 -68
  71. data/lib/lemon/reporter/outline.rb +0 -105
  72. data/lib/lemon/reporter/verbose.rb +0 -143
  73. data/lib/lemon/runner.rb +0 -308
  74. data/lib/lemon/snapshot.rb +0 -185
  75. data/lib/lemon/test/case.rb +0 -139
  76. data/lib/lemon/test/concern.rb +0 -52
  77. data/lib/lemon/test/suite.rb +0 -229
  78. data/test/case_coverage.rb +0 -26
  79. data/test/case_testcase.rb +0 -58
@@ -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
-
@@ -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
-