concordion 0.9.8 → 0.9.9.2

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.
Files changed (210) hide show
  1. data/Rakefile.rb +6 -6
  2. data/lib/concordion.rb +15 -0
  3. data/nbproject/private/private.properties +2 -4
  4. data/nbproject/private/rake-d.txt +5 -5
  5. data/nbproject/project.properties +4 -8
  6. data/nbproject/project.xml +3 -4
  7. data/tests/basic_assert.html +19 -1
  8. data/tests/basic_set.html +20 -6
  9. data/tests/basic_text.html +19 -9
  10. data/tests/failing.html +20 -5
  11. data/tests/failing_test.rb +1 -8
  12. data/tests/link_style_css.html +13 -1
  13. data/tests/lookahead_assert_true.html +28 -5
  14. data/tests/mixed.html +18 -1
  15. data/tests/return_result.html +20 -3
  16. data/tests/tables/table.html +47 -5
  17. data/tests/tables/verify_rows.html +60 -1
  18. data/tests/user-reported/basic_assert_true.html +25 -2
  19. data/tests/user-reported/basic_assert_true_test.rb +0 -3
  20. data/tests/user-reported/rubyish.html +42 -0
  21. data/tests/user-reported/{no_parens_test.rb → rubyish_test.rb} +1 -1
  22. metadata +16 -225
  23. data/README +0 -10
  24. data/html/classes/ConcordionBinder.html +0 -176
  25. data/html/classes/ConcordionBinder.src/M000042.html +0 -18
  26. data/html/classes/ConcordionBinder.src/M000043.html +0 -23
  27. data/html/classes/ConcordionBinder.src/M000044.html +0 -20
  28. data/html/classes/ConcordionCSS.html +0 -146
  29. data/html/classes/ConcordionCSS.src/M000100.html +0 -18
  30. data/html/classes/ConcordionCSS.src/M000101.html +0 -20
  31. data/html/classes/ConcordionCSSDecorator.html +0 -242
  32. data/html/classes/ConcordionCSSDecorator.src/M000011.html +0 -25
  33. data/html/classes/ConcordionCSSDecorator.src/M000012.html +0 -18
  34. data/html/classes/ConcordionCSSDecorator.src/M000013.html +0 -18
  35. data/html/classes/ConcordionCSSDecorator.src/M000014.html +0 -18
  36. data/html/classes/ConcordionCSSDecorator.src/M000015.html +0 -18
  37. data/html/classes/ConcordionCSSDecorator.src/M000016.html +0 -18
  38. data/html/classes/ConcordionCSSDecorator.src/M000017.html +0 -20
  39. data/html/classes/ConcordionCSSDecorator.src/M000018.html +0 -29
  40. data/html/classes/ConcordionConfigMethods.html +0 -146
  41. data/html/classes/ConcordionConfigMethods.src/M000123.html +0 -30
  42. data/html/classes/ConcordionConfigMethods.src/M000124.html +0 -26
  43. data/html/classes/ConcordionConstants.html +0 -146
  44. data/html/classes/ConcordionConstants.src/M000121.html +0 -20
  45. data/html/classes/ConcordionConstants.src/M000122.html +0 -18
  46. data/html/classes/ConcordionEnvironment.html +0 -212
  47. data/html/classes/ConcordionEnvironment.src/M000022.html +0 -18
  48. data/html/classes/ConcordionEnvironment.src/M000023.html +0 -18
  49. data/html/classes/ConcordionEnvironment.src/M000024.html +0 -18
  50. data/html/classes/ConcordionEnvironment.src/M000025.html +0 -18
  51. data/html/classes/ConcordionEnvironment.src/M000026.html +0 -19
  52. data/html/classes/ConcordionEnvironment.src/M000027.html +0 -19
  53. data/html/classes/ConcordionErrorCondition.html +0 -179
  54. data/html/classes/ConcordionErrorCondition.src/M000032.html +0 -22
  55. data/html/classes/ConcordionErrorCondition.src/M000033.html +0 -25
  56. data/html/classes/ConcordionInstrumenter.html +0 -152
  57. data/html/classes/ConcordionInstrumenter.src/M000045.html +0 -30
  58. data/html/classes/ConcordionInstrumenter.src/M000046.html +0 -22
  59. data/html/classes/ConcordionInternalTestMethods.html +0 -213
  60. data/html/classes/ConcordionInternalTestMethods.src/M000094.html +0 -25
  61. data/html/classes/ConcordionInternalTestMethods.src/M000095.html +0 -23
  62. data/html/classes/ConcordionInternalTestMethods.src/M000096.html +0 -26
  63. data/html/classes/ConcordionInternalTestMethods.src/M000097.html +0 -29
  64. data/html/classes/ConcordionInternalTestMethods.src/M000098.html +0 -22
  65. data/html/classes/ConcordionInternalTestMethods.src/M000099.html +0 -18
  66. data/html/classes/ConcordionInvoker.html +0 -327
  67. data/html/classes/ConcordionInvoker.src/M000058.html +0 -18
  68. data/html/classes/ConcordionInvoker.src/M000059.html +0 -26
  69. data/html/classes/ConcordionInvoker.src/M000060.html +0 -23
  70. data/html/classes/ConcordionInvoker.src/M000061.html +0 -26
  71. data/html/classes/ConcordionInvoker.src/M000062.html +0 -27
  72. data/html/classes/ConcordionInvoker.src/M000063.html +0 -22
  73. data/html/classes/ConcordionInvoker.src/M000064.html +0 -25
  74. data/html/classes/ConcordionInvoker.src/M000065.html +0 -26
  75. data/html/classes/ConcordionInvoker.src/M000066.html +0 -18
  76. data/html/classes/ConcordionInvoker.src/M000067.html +0 -18
  77. data/html/classes/ConcordionInvoker.src/M000068.html +0 -18
  78. data/html/classes/ConcordionInvoker.src/M000069.html +0 -26
  79. data/html/classes/ConcordionInvoker.src/M000070.html +0 -35
  80. data/html/classes/ConcordionLookaheadHandler.html +0 -152
  81. data/html/classes/ConcordionLookaheadHandler.src/M000028.html +0 -18
  82. data/html/classes/ConcordionLookaheadHandler.src/M000029.html +0 -22
  83. data/html/classes/ConcordionParseResult.html +0 -369
  84. data/html/classes/ConcordionParseResult.src/M000076.html +0 -21
  85. data/html/classes/ConcordionParseResult.src/M000077.html +0 -18
  86. data/html/classes/ConcordionParseResult.src/M000078.html +0 -18
  87. data/html/classes/ConcordionParseResult.src/M000079.html +0 -18
  88. data/html/classes/ConcordionParseResult.src/M000080.html +0 -18
  89. data/html/classes/ConcordionParseResult.src/M000081.html +0 -18
  90. data/html/classes/ConcordionParseResult.src/M000082.html +0 -18
  91. data/html/classes/ConcordionParseResult.src/M000083.html +0 -18
  92. data/html/classes/ConcordionParseResult.src/M000084.html +0 -19
  93. data/html/classes/ConcordionParseResult.src/M000085.html +0 -18
  94. data/html/classes/ConcordionParseResult.src/M000086.html +0 -18
  95. data/html/classes/ConcordionParseResult.src/M000087.html +0 -21
  96. data/html/classes/ConcordionParseResult.src/M000088.html +0 -22
  97. data/html/classes/ConcordionParseResult.src/M000089.html +0 -22
  98. data/html/classes/ConcordionParser.html +0 -214
  99. data/html/classes/ConcordionParser.src/M000002.html +0 -21
  100. data/html/classes/ConcordionParser.src/M000003.html +0 -20
  101. data/html/classes/ConcordionParser.src/M000004.html +0 -20
  102. data/html/classes/ConcordionParser.src/M000005.html +0 -26
  103. data/html/classes/ConcordionProcessor.html +0 -176
  104. data/html/classes/ConcordionProcessor.src/M000019.html +0 -19
  105. data/html/classes/ConcordionProcessor.src/M000020.html +0 -22
  106. data/html/classes/ConcordionProcessor.src/M000021.html +0 -18
  107. data/html/classes/ConcordionReader.html +0 -144
  108. data/html/classes/ConcordionReader.src/M000001.html +0 -18
  109. data/html/classes/ConcordionState.html +0 -299
  110. data/html/classes/ConcordionState.src/M000052.html +0 -18
  111. data/html/classes/ConcordionState.src/M000053.html +0 -23
  112. data/html/classes/ConcordionState.src/M000054.html +0 -18
  113. data/html/classes/ConcordionState.src/M000055.html +0 -18
  114. data/html/classes/ConcordionState.src/M000056.html +0 -25
  115. data/html/classes/ConcordionState.src/M000057.html +0 -28
  116. data/html/classes/ConcordionStringUtility.html +0 -259
  117. data/html/classes/ConcordionStringUtility.src/M000102.html +0 -18
  118. data/html/classes/ConcordionStringUtility.src/M000103.html +0 -18
  119. data/html/classes/ConcordionStringUtility.src/M000104.html +0 -18
  120. data/html/classes/ConcordionStringUtility.src/M000105.html +0 -18
  121. data/html/classes/ConcordionStringUtility.src/M000106.html +0 -18
  122. data/html/classes/ConcordionStringUtility.src/M000107.html +0 -18
  123. data/html/classes/ConcordionStringUtility.src/M000108.html +0 -43
  124. data/html/classes/ConcordionStringUtility.src/M000109.html +0 -18
  125. data/html/classes/ConcordionStringUtility.src/M000110.html +0 -18
  126. data/html/classes/ConcordionStringWriter.html +0 -165
  127. data/html/classes/ConcordionStringWriter.src/M000030.html +0 -19
  128. data/html/classes/ConcordionStringWriter.src/M000031.html +0 -18
  129. data/html/classes/ConcordionTestCase.html +0 -220
  130. data/html/classes/ConcordionTestCase.src/M000006.html +0 -19
  131. data/html/classes/ConcordionTestCase.src/M000007.html +0 -19
  132. data/html/classes/ConcordionTestCase.src/M000008.html +0 -19
  133. data/html/classes/ConcordionTestCase.src/M000009.html +0 -18
  134. data/html/classes/ConcordionTestCase.src/M000010.html +0 -18
  135. data/html/classes/ConcordionTestMethods.html +0 -151
  136. data/html/classes/ConcordionTestMethods.src/M000092.html +0 -24
  137. data/html/classes/ConcordionUtility.html +0 -229
  138. data/html/classes/ConcordionUtility.src/M000114.html +0 -18
  139. data/html/classes/ConcordionUtility.src/M000115.html +0 -34
  140. data/html/classes/ConcordionUtility.src/M000116.html +0 -22
  141. data/html/classes/ConcordionUtility.src/M000117.html +0 -18
  142. data/html/classes/ConcordionUtility.src/M000118.html +0 -22
  143. data/html/classes/ConcordionUtility.src/M000119.html +0 -18
  144. data/html/classes/ConcordionUtility.src/M000120.html +0 -25
  145. data/html/classes/ConcordionVerifier.html +0 -219
  146. data/html/classes/ConcordionVerifier.src/M000071.html +0 -20
  147. data/html/classes/ConcordionVerifier.src/M000072.html +0 -20
  148. data/html/classes/ConcordionVerifier.src/M000073.html +0 -23
  149. data/html/classes/ConcordionVerifier.src/M000074.html +0 -22
  150. data/html/classes/ConcordionVerifier.src/M000075.html +0 -28
  151. data/html/classes/ConcordionWriter.html +0 -244
  152. data/html/classes/ConcordionWriter.src/M000034.html +0 -18
  153. data/html/classes/ConcordionWriter.src/M000035.html +0 -20
  154. data/html/classes/ConcordionWriter.src/M000036.html +0 -18
  155. data/html/classes/ConcordionWriter.src/M000037.html +0 -18
  156. data/html/classes/ConcordionWriter.src/M000038.html +0 -21
  157. data/html/classes/ConcordionWriter.src/M000039.html +0 -22
  158. data/html/classes/ConcordionWriter.src/M000040.html +0 -18
  159. data/html/classes/ConcordionWriter.src/M000041.html +0 -18
  160. data/html/classes/FailConditionally.html +0 -131
  161. data/html/classes/FailConditionally.src/M000090.html +0 -22
  162. data/html/classes/GoldmasterTestCase.html +0 -208
  163. data/html/classes/GoldmasterTestCase.src/M000047.html +0 -22
  164. data/html/classes/GoldmasterTestCase.src/M000048.html +0 -18
  165. data/html/classes/GoldmasterTestCase.src/M000049.html +0 -18
  166. data/html/classes/GoldmasterTestCase.src/M000050.html +0 -18
  167. data/html/classes/GoldmasterTestCase.src/M000051.html +0 -31
  168. data/html/classes/LoaderHelper.html +0 -138
  169. data/html/classes/LoaderHelper.src/M000093.html +0 -24
  170. data/html/classes/PluralToSingularUtility.html +0 -131
  171. data/html/classes/PluralToSingularUtility.src/M000091.html +0 -18
  172. data/html/classes/SnakeCaseUtility.html +0 -161
  173. data/html/classes/SnakeCaseUtility.src/M000111.html +0 -23
  174. data/html/classes/SnakeCaseUtility.src/M000112.html +0 -20
  175. data/html/classes/SnakeCaseUtility.src/M000113.html +0 -18
  176. data/html/created.rid +0 -1
  177. data/html/files/README.html +0 -123
  178. data/html/files/lib/concordion_binder_rb.html +0 -108
  179. data/html/files/lib/concordion_constants_rb.html +0 -101
  180. data/html/files/lib/concordion_css_decorator_rb.html +0 -109
  181. data/html/files/lib/concordion_css_rb.html +0 -101
  182. data/html/files/lib/concordion_environment_rb.html +0 -101
  183. data/html/files/lib/concordion_error_condition_rb.html +0 -108
  184. data/html/files/lib/concordion_instrumenter_rb.html +0 -101
  185. data/html/files/lib/concordion_invoker_rb.html +0 -109
  186. data/html/files/lib/concordion_lookahead_handler_rb.html +0 -101
  187. data/html/files/lib/concordion_parse_result_rb.html +0 -108
  188. data/html/files/lib/concordion_parser_rb.html +0 -110
  189. data/html/files/lib/concordion_processor_rb.html +0 -108
  190. data/html/files/lib/concordion_rb.html +0 -108
  191. data/html/files/lib/concordion_reader_rb.html +0 -108
  192. data/html/files/lib/concordion_state_rb.html +0 -112
  193. data/html/files/lib/concordion_string_utility_rb.html +0 -101
  194. data/html/files/lib/concordion_string_writer_rb.html +0 -101
  195. data/html/files/lib/concordion_test_case_rb.html +0 -119
  196. data/html/files/lib/concordion_test_methods_rb.html +0 -125
  197. data/html/files/lib/concordion_utility_rb.html +0 -109
  198. data/html/files/lib/concordion_verifier_rb.html +0 -108
  199. data/html/files/lib/concordion_writer_rb.html +0 -101
  200. data/html/files/lib/goldmaster_test_case_rb.html +0 -110
  201. data/html/files/lib/loader_helper_rb.html +0 -108
  202. data/html/files/lib/rcor_rb.html +0 -108
  203. data/html/fr_class_index.html +0 -54
  204. data/html/fr_file_index.html +0 -52
  205. data/html/fr_method_index.html +0 -150
  206. data/html/index.html +0 -24
  207. data/html/rdoc-style.css +0 -208
  208. data/nbproject/private/config.properties +0 -0
  209. data/nbproject/private/private.xml +0 -4
  210. data/tests/user-reported/no_parens.html +0 -15
data/Rakefile.rb CHANGED
@@ -6,7 +6,7 @@ require 'rake/gempackagetask'
6
6
  require 'rake/clean'
7
7
  require 'lib/concordion_environment'
8
8
 
9
- CLEAN.include(ConcordionEnvironment.clean_list)
9
+ CLEAN.include(ConcordionEnvironment.clean_list + ["html"])
10
10
 
11
11
 
12
12
  Rake::RDocTask.new do |rd|
@@ -26,26 +26,26 @@ end
26
26
 
27
27
  task :default => [:clean, :clobber_rdoc, :rdoc, :test]
28
28
 
29
- task :commit_prep => [:test, :clean, :clobber_rdoc]
29
+ task :commit_prep => [:test, :clean, :clobber_rdoc, :clobber_package]
30
30
 
31
31
  PKG_FILES = FileList['**/*'].exclude(/_test_output\.html$/)
32
- PKG_VERSION = '0.9.8'
32
+ PKG_VERSION = '0.9.9.2'
33
33
 
34
34
  spec = Gem::Specification.new do |s|
35
35
  s.platform = Gem::Platform::RUBY
36
36
  s.summary = "Ruby Concordion"
37
37
  s.name = 'concordion'
38
38
  s.rubyforge_project = 'ruby-concordion'
39
- #TODO fix the above when the new rubyforge project is available
40
39
  s.version = PKG_VERSION
41
40
  s.author = 'Ben Goodspeed'
42
41
  s.email = 'ben@goodspeed-it.ca'
43
- s.homepage ="http://code.google.com/p/rcor/"
42
+ s.homepage ="http://ruby-concordion.rubyforge.org'"
44
43
  s.add_dependency('hpricot', '>= 0.6')
44
+ s.add_dependency('diff-lcs', '>= 1.1.2')
45
45
  s.requirements << 'hpricot HTML parser'
46
46
  s.require_path = 'lib'
47
47
  s.has_rdoc = true
48
- s.rdoc_options << '--title' << 'Ruby Concordion' << '--main' << 'README' << '--line-numbers'
48
+ s.rdoc_options << '--title' << 'Ruby Concordion' << '--main' << "lib/concordion.rb" << '--line-numbers'
49
49
  s.files = PKG_FILES
50
50
  end
51
51
 
data/lib/concordion.rb CHANGED
@@ -1,2 +1,17 @@
1
1
 
2
+ # Ruby Concordion
3
+ #
4
+ # Active specifications for Ruby. Based on Concordion and FIT for Java.
5
+ #
6
+ # Attributed HTML which can be read and edited by non-technical people become
7
+ # active specifications which automatically validate the behavior of the system.
8
+ #
9
+ # See the project homepage at: http://ruby-concordion.rubyforge.org/
10
+ #
11
+ # To learn more look at the specifications in the "tests/" directory, they are viewable in a browser. They serve as both the user manual and the regression test suite for the system.
12
+ #
13
+ # Ruby Concordion was written by Ben Goodspeed of Goodspeed IT Consulting: http://goodspeed-it.ca/
14
+
15
+
16
+
2
17
  require 'concordion_test_case'
@@ -1,4 +1,2 @@
1
- file.reference.rcor-lib=C:\\rcor\\lib
2
- file.reference.rcor-test-lib=C:\\rcor\\test-lib
3
- file.reference.rcor-tests=C:\\rcor\\tests
4
- platform.active=Ruby
1
+ file.reference.trunk-lib=/home/bg/src/concordion/ruby-concordion/trunk/lib
2
+ file.reference.trunk-tests=/home/bg/src/concordion/ruby-concordion/trunk/tests
@@ -5,15 +5,15 @@ clobber_rcov=Remove rcov products for rcov
5
5
  clobber_rdoc=Remove rdoc products
6
6
  commit_prep=
7
7
  default=
8
- gem=Build the gem file concordion-0.9.8.gem
8
+ gem=Build the gem file concordion-0.9.9.gem
9
9
  html=
10
10
  html/index.html=
11
11
  package=Build all the packages
12
12
  pkg=
13
- pkg/concordion-0.9.8=
14
- pkg/concordion-0.9.8.gem=
15
- pkg/concordion-0.9.8.tgz=
16
- pkg/concordion-0.9.8.zip=
13
+ pkg/concordion-0.9.9=
14
+ pkg/concordion-0.9.9.gem=
15
+ pkg/concordion-0.9.9.tgz=
16
+ pkg/concordion-0.9.9.zip=
17
17
  rcov=Analyze code coverage with tests
18
18
  rdoc=Build the rdoc HTML Files
19
19
  repackage=Force a rebuild of the package files
@@ -1,11 +1,7 @@
1
- file.reference.rcor-lib=lib
2
- file.reference.rcor-test-lib=test-lib
3
- file.reference.rcor-tests=tests
4
- javac.classpath=
1
+ file.reference.trunk-lib=lib
2
+ file.reference.trunk-tests=tests
5
3
  main.file=
6
4
  platform.active=Ruby
7
- ruby.includejava=false
8
5
  source.encoding=windows-1252
9
- src.lib.dir=lib
10
- src.test-lib.dir=test-lib
11
- test.tests.dir=tests
6
+ src.dir=${file.reference.trunk-lib}
7
+ test.src.dir=${file.reference.trunk-tests}
@@ -3,13 +3,12 @@
3
3
  <type>org.netbeans.modules.ruby.rubyproject</type>
4
4
  <configuration>
5
5
  <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
- <name>rcor</name>
6
+ <name>Concordion</name>
7
7
  <source-roots>
8
- <root id="src.test-lib.dir"/>
9
- <root id="src.lib.dir"/>
8
+ <root id="src.dir"/>
10
9
  </source-roots>
11
10
  <test-roots>
12
- <root id="test.tests.dir"/>
11
+ <root id="test.src.dir"/>
13
12
  </test-roots>
14
13
  </data>
15
14
  </configuration>
@@ -1,5 +1,23 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <b concordion:assertEquals="getGreeting()">Hello World!</b>
3
+ <span>
4
+ <h1>assertEquals</h1>
5
+ <h4> Here is an example of a basic assertion made with <b>assertEquals.</b></h4>
6
+ <blockquote>
7
+ The greeting should be &lt;b concordion:assertEquals="getGreeting()"&gt;Hello World!&lt;/b&gt;.
8
+ </blockquote>
9
+ <h4> The relevent fragments of the tag are:</h4>
10
+ <ul>
11
+ <li>concordion - a namespace that browsers will not attempt to interpret.</li>
12
+ <li>assertEquals - the concordion command to invoke.</li>
13
+ <li>getGreeting - the fixture method to invoke, delegating to the system under test.</li>
14
+ <li>Hello World! - the expected output from the fixture.</li>
15
+ </ul>
16
+ <h4>And here's what it looks like:</h4>
17
+ <blockquote>
18
+ The greeting should be <b concordion:assertEquals="getGreeting()">Hello World!</b>.
19
+ </blockquote>
20
+
21
+ </span>
4
22
  </body>
5
23
  </html>
data/tests/basic_set.html CHANGED
@@ -1,11 +1,25 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- Here's some text
4
- <p concordion:set="#username">Chuck Norris</p>
5
- <p concordion:set="#mnks">Monkeys</p>
6
- <p concordion:set="#mnks">Monkeys</p>
3
+ <span>
4
+ <h1>set</h1>
5
+ <h4>Here is an example of how to <i>set</i> a variable and use it in a subsequent tag.</h4>
6
+ <blockquote>
7
+ If my username is &lt;span concordion:set="#username"&gt;Chuck Norris&lt;/span&gt;<br/>
8
+ Then the system should greet me with &lt;span concordion:assertEquals="greetingFor(#username)"&gt;Hello Chuck Norris, you nancy-boy.&lt;/span&gt;
9
+ </blockquote>
10
+ <h4> The relevent fragments of the tag are:</h4>
11
+ <ul>
12
+ <li>set - tells concordion to bind the variable (whose name begins with #)</li>
13
+ <li>#username - the concordion variable name that will be bound to the tag contents</li>
14
+ <li>Chuck Norris - the value of the variable</li>
15
+ <li>greetingFor(#username) - invocation of a fixture method with the variable as an argument.</li>
16
+ </ul>
17
+ <h4>And here's what it looks like:</h4>
18
+ <blockquote>
19
+ If my username is <span concordion:set="#username">Chuck Norris</span><br/>
20
+ Then the system should greet me with <span concordion:assertEquals="greetingFor(#username)">Hello Chuck Norris, you nancy-boy.</span>
21
+ </blockquote>
7
22
 
8
- <p concordion:assertEquals="greetingFor(#username)">Hello Chuck Norris, you nancy-boy.</p>
9
- it should be in the output.
23
+ </span>
10
24
  </body>
11
25
  </html>
@@ -1,14 +1,24 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <p concordion:execute="set_name(#TEXT)">No</p>
4
- <p concordion:assertEquals="double_down()">NoNo</p>
5
-
6
- <p concordion:execute="#result = return_arg(#TEXT)">Working Text</p>
7
- <p concordion:assertEquals="#result">Working Text</p>
8
-
9
- <p concordion:execute="#result = concat(#TEXT,#TEXT)">Working Text 2</p>
10
- <p concordion:assertEquals="#result">Working Text 2:Working Text 2</p>
11
-
3
+ <span>
4
+ <h1>#TEXT</h1>
5
+ <h4>Here is an example of how to use the implicit concordion <i>#TEXT</i> variable.</h4>
6
+ <blockquote>
7
+ When joining &lt;quote concordion:execute="#result = concat(#TEXT,#TEXT)"&gt;Goodspeed&lt;/quote&gt; with itself <br/>
8
+ the result should be: &lt;quote concordion:assertEquals="#result"&gt;Goodspeed:Goodspeed&lt;/quote&gt;.
9
+ </blockquote>
10
+ <h4> The relevent fragments of the tag are:</h4>
11
+ <ul>
12
+ <li>#TEXT - bound to the contents out the tag, in this case 'Goodspeed'</li>
13
+ <li>concat - the fixture method being given 'Goodspeed', 'Goodspeed' as arguments.</li>
14
+ <li>#result - the concordion variable to store the result in.</li>
15
+ </ul>
16
+ <h4>And here's what it looks like:</h4>
17
+ <blockquote>
18
+ When joining <quote concordion:execute="#result = concat(#TEXT,#TEXT)">Goodspeed</quote> with itself
19
+ the result should be: <quote concordion:assertEquals="#result">Goodspeed:Goodspeed</quote>.
20
+ </blockquote>
21
+ </span>
12
22
 
13
23
  </body>
14
24
  </html>
data/tests/failing.html CHANGED
@@ -1,9 +1,24 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <p concordion:assertEquals="wrong_value()">right value</p>
4
- <p concordion:assertEquals="wrong_value2()">right value</p>
5
- <div>
6
- <span concordion:assertEquals="wrong_value3()">right value</span>
7
- </div>
3
+ <span>
4
+ <h1>Expected Failures</h1>
5
+ <h4>Here is an example of how to use concordion when you <i>expect failures</i></h4>
6
+ <blockquote>
7
+ I should get the &lt;span concordion:assertEquals="wrong_value()"&gt;right value&lt;/span&gt;.
8
+ </blockquote>
9
+ <h4>The relevent fragments of the fixture are:</h4>
10
+ <blockquote>
11
+ def expected_failure_count<br/> 2<br/> end
12
+ </blockquote>
13
+ <h4>It should look like this:</h4>
14
+ <blockquote>
15
+ I should get the <span concordion:assertEquals="wrong_value()">right value</span>.
16
+ </blockquote>
17
+ <h4>Similary calling a method doesn't exist looks like this:</h4>
18
+ <blockquote>
19
+ I should get the <span concordion:assertEquals="a_method_that_does_not_exist">right value</span>.
20
+ </blockquote>
21
+ </span>
22
+
8
23
  </body>
9
24
  </html>
@@ -4,16 +4,9 @@ require 'concordion_test_case'
4
4
  class FailingTest < ConcordionTestCase
5
5
 
6
6
  def expected_failure_count
7
- 3
7
+ 2
8
8
  end
9
9
 
10
- def wrong_value4
11
- "wrong"
12
- end
13
-
14
- def wrong_value2
15
- "wrong"
16
- end
17
10
  def wrong_value
18
11
  "wrong"
19
12
  end
@@ -1,5 +1,17 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <b concordion:assertEquals="getGreeting()">Hello World!</b>
3
+ <span>
4
+ <h1>Linked Concordion CSS</h1>
5
+ <h4>Here's an example of how to make concordion link to concordion.css rather than inlining the styles.</h4>
6
+ <h4>The relevent fragments of the fixture are:</h4>
7
+ <blockquote>
8
+ def css_type; :link ; end
9
+ </blockquote>
10
+
11
+ <h4>And here's what it looks like:</h4>
12
+ <blockquote>
13
+ <b concordion:assertEquals="getGreeting()">Hello World!</b>
14
+ </blockquote>
15
+ </span>
4
16
  </body>
5
17
  </html>
@@ -1,17 +1,39 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <p>The greeting for user <span concordion:set="#firstName">Bob</span>
4
- will be:
3
+ <span>
4
+ <h1>Lookahead</h1>
5
+ <h4>Concordion will <i>lookahead</i> in nested tags to bind variables.</h4>
6
+ <blockquote>
7
+ &lt;p&gt;When &lt;span concordion:set="#firstName"&gt;Bob&lt;/span&gt; logs in he will be greeted with: <br/>
8
+ &lt;span concordion:assertEquals="greeting_for(#firstName)"&gt;Hello Bob!&lt;/span&gt; <br/>
9
+ &lt;/p&gt; <br/>
10
+ &lt;p&gt;The first name <br/>
11
+ &lt;span concordion:assertTrue="starts_with(#firstName, #letter)"&gt;starts <br/>
12
+ with &lt;b concordion:set="#letter"&gt;B&lt;/b&gt;&lt;/span&gt;.<br/>
13
+ &lt;/p&gt;
14
+
15
+ </blockquote>
16
+ <h4> The relevent fragments of the tag are:</h4>
17
+ <ul>
18
+ <li>#firstname - stays bound as "Bob" throughout</li>
19
+ <li>#letter - referenced in assertTrue before its bound</li>
20
+ </ul>
21
+ <h4>And here's what it looks like:</h4>
22
+ <blockquote>
23
+ <p>When <span concordion:set="#firstName">Bob</span>
24
+ logs in he will be greeted with:
5
25
  <span concordion:assertEquals="greeting_for(#firstName)">Hello Bob!</span>
6
26
  </p>
7
-
8
27
  <p>The first name
9
28
  <span concordion:assertTrue="starts_with(#firstName, #letter)">starts
10
29
  with <b concordion:set="#letter">B</b></span>.
11
30
  </p>
31
+ </blockquote>
32
+ <h4>Some more examples:</h4>
33
+ <blockquote>
12
34
 
13
35
  <p>The first name
14
- <span concordion:assertTrue="not_starts_with(#firstName, #letter)">starts
36
+ <span concordion:assertTrue="not_starts_with(#firstName, #letter)">does not start
15
37
  with <b concordion:set="#letter">Z</b></span>.
16
38
  </p>
17
39
 
@@ -19,7 +41,8 @@
19
41
  <span concordion:assertTrue="starts_with(#firstName, #letter)">starts
20
42
  with <b concordion:set="#letter">B</b></span>.
21
43
  </p>
22
-
44
+ </blockquote>
45
+ </span>
23
46
 
24
47
  </body>
25
48
  </html>
data/tests/mixed.html CHANGED
@@ -1,5 +1,22 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <p concordion:assertEquals="easy">as pie</p>
3
+ <span>
4
+ <h1>Mixing Base Classes</h1>
5
+ <h4>Here is an example of how to use concordion with a different <i>base class</i> .</h4>
6
+ <blockquote>
7
+ It's as easy &lt;span&gt; concordion:assertEquals="easy">as pie&lt;/span&gt;
8
+ </blockquote>
9
+ <h4> The relevent fragments of the fixture are:</h4>
10
+ <ul>
11
+ <li>class MixedTest &lt; Test::Unit::TestCase - no need to descend from ConcordionTestCase.</li>
12
+ <li>include ConcordionTestMethods - makes any test case a concordion test case. No need to descend from ConcordionTestCase.</li>
13
+ </ul>
14
+ <h4>And here's what it looks like:</h4>
15
+ <blockquote>
16
+ It's as easy <span concordion:assertEquals="easy">as pie</span>
17
+ </blockquote>
18
+ </span>
19
+
20
+
4
21
  </body>
5
22
  </html>
@@ -1,7 +1,24 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <p concordion:execute="#result = split_name(#TEXT)">No Way</p>
4
- <p concordion:assertEquals="#result.first">No</p>
5
- <p concordion:assertEquals="#result.last">Way</p>
3
+ <span>
4
+ <h1>Returned Results</h1>
5
+ <h4>Here is an example of binding a ruby object to a concordion variable.</h4>
6
+ <blockquote>
7
+ Splitting the name &lt;quote concordion:execute="#result = split_name(#TEXT)"&gt;Ben Goodspeed&lt;/quote&gt;<br/>
8
+ can return a real object with properties like 'first' which should be &lt;quote concordion:assertEquals="#result.first"&gt;Ben&lt;/quote&gt;<br/>
9
+ and 'last' which is &lt;quote concordion:assertEquals="#result.last"&gt;Goodspeed&lt;/quote&gt;<br/>
10
+ </blockquote>
11
+ <h4> The relevent fragments of the tag are:</h4>
12
+ <ul>
13
+ <li>#result = split_name - invokes the split_name fixture method, and returns a name object</li>
14
+ <li>#result.first - obtains the "first" attribute from the returned object.</li>
15
+ </ul>
16
+ <h4>And here's what it looks like:</h4>
17
+ <blockquote>
18
+ Splitting the name <quote concordion:execute="#result = split_name(#TEXT)">Ben Goodspeed</quote>
19
+ can return a real object with properties like 'first' which should be <quote concordion:assertEquals="#result.first">Ben</quote>
20
+ and 'last' which is <quote concordion:assertEquals="#result.last">Goodspeed</quote>.
21
+ </blockquote>
22
+ </span>
6
23
  </body>
7
24
  </html>
@@ -1,11 +1,49 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
+
4
+ <span>
5
+ <h1>Tables</h1>
6
+ <h4>Here is an example of how to use <i>tables</i>.</h4>
7
+ <blockquote>
8
+
9
+ &lt;table&gt; <br/>
10
+ &lt;tr&gt;<br/>
11
+ &lt;th concordion:execute="#row_result = split_by_colons(#TEXT)"&gt;Given Text To Split By Colons and Uppercase:&lt;/th&gt;<br/>
12
+ &lt;th concordion:assertEquals="#row_result.alpha"&gt;The First Field is:&lt;/th&gt;<br/>
13
+ &lt;th concordion:assertEquals="#row_result.beta"&gt;The Second Field is:&lt;/th&gt;<br/>
14
+ &lt;th concordion:assertEquals="#row_result.gamma"&gt;The Third Field is:&lt;/th&gt;<br/>
15
+ &lt;/tr&gt;<br/>
16
+ <br/>
17
+ &lt;tr&gt;<br/>
18
+ &lt;td&gt;a:b:c&lt;/td&gt;<br/>
19
+ &lt;td&gt;A&lt;/td&gt;<br/>
20
+ &lt;td&gt;B&lt;/td&gt;<br/>
21
+ &lt;td&gt;C&lt;/td&gt;<br/>
22
+ &lt;/tr&gt;<br/>
23
+
24
+ &lt;tr&gt;<br/>
25
+ &lt;td&gt;d:e:f&lt;/td&gt;<br/>
26
+ &lt;td&gt;D&lt;/td&gt;<br/>
27
+ &lt;td&gt;E&lt;/td&gt;<br/>
28
+ &lt;td&gt;F&lt;/td&gt;<br/>
29
+ &lt;/tr&gt;<br/>
30
+
31
+ &lt;/table&gt;<br/>
32
+
33
+ </blockquote>
34
+ <h4> The relevent fragments of the tag are:</h4>
35
+ <ul>
36
+ <li>execute - when placed on a table header (th) tag, the attribution is copied to all rows.</li>
37
+ <li>#row_result - rebound for each row by calling 'split_by_colons' with the first column's contents as an argument.</li>
38
+ </ul>
39
+ <h4>And here's what it looks like:</h4>
40
+ <blockquote>
3
41
  <table>
4
42
  <tr>
5
- <th concordion:execute="#row_result = split_by_colons(#TEXT)">Given Text:</th>
6
- <th concordion:assertEquals="#row_result.alpha">First Field:</th>
7
- <th concordion:assertEquals="#row_result.beta">Second Field:</th>
8
- <th concordion:assertEquals="#row_result.gamma">Third Field:</th>
43
+ <th concordion:execute="#row_result = split_by_colons(#TEXT)">Given Text To Split By Colons and Uppercase:</th>
44
+ <th concordion:assertEquals="#row_result.alpha">The First Field is:</th>
45
+ <th concordion:assertEquals="#row_result.beta">The Second Field is:</th>
46
+ <th concordion:assertEquals="#row_result.gamma">The Third Field is:</th>
9
47
  </tr>
10
48
 
11
49
  <tr>
@@ -21,8 +59,12 @@
21
59
  <td>E</td>
22
60
  <td>F</td>
23
61
  </tr>
24
-
62
+
25
63
  </table>
26
64
 
65
+ </blockquote>
66
+ </span>
67
+
68
+
27
69
  </body>
28
70
  </html>
@@ -1,7 +1,62 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <p>Given these users:</p>
4
3
 
4
+
5
+ <span>
6
+ <h1>Verify Rows</h1>
7
+ <h4>Here is an example of how to use the <i>verifyRows</i> command.</h4>
8
+ <blockquote>
9
+ &lt;p&gt;Given these users:&lt;/p&gt;<br/>
10
+ &lt;table&gt;<br/>
11
+ &lt;tr&gt;<br/>
12
+ &lt;th concordion:set="#username"&gt;Username&lt;/th&gt;<br/>
13
+ &lt;th concordion:execute="setupUser(#username, #TEXT)"&gt;Other&lt;/th&gt;<br/>
14
+ &lt;/tr&gt;<br/>
15
+ &lt;tr&gt;<br/>
16
+ &lt;td&gt;john.lennon&lt;/td&gt;<br/>
17
+ &lt;td&gt;monkeys&lt;/td&gt;<br/>
18
+ &lt;/tr&gt;<br/>
19
+ &lt;tr&gt;<br/>
20
+ &lt;td&gt;ringo.starr&lt;/td&gt;<br/>
21
+ &lt;td&gt;chucknorris&lt;/td&gt;<br/>
22
+ &lt;/tr&gt;<br/>
23
+ &lt;tr&gt;<br/>
24
+ &lt;td&gt;george.harrison&lt;/td&gt;<br/>
25
+ &lt;td&gt;dishwasher&lt;/td&gt;<br/>
26
+ &lt;/tr&gt;<br/>
27
+ &lt;tr&gt;<br/>
28
+ &lt;td&gt;paul.mcartney&lt;/td&gt;<br/>
29
+ &lt;td&gt;flamingweasel&lt;/td&gt;<br/>
30
+ &lt;/tr&gt;<br/>
31
+ &lt;/table&gt;<br/>
32
+ <br/>
33
+ &lt;p&gt;Searching for "&lt;b concordion:set="#searchString"&gt;arr&lt;/b&gt;" will return:&lt;/p&gt;<br/>
34
+ <br/>
35
+ &lt;table concordion:verifyRows="#users = getSearchResultsFor(#searchString)"&gt;<br/>
36
+ &lt;tr&gt;<br/>
37
+ &lt;th concordion:assertEquals="#user.name"&gt;Matching Usernames&lt;/th&gt;<br/>
38
+ &lt;th concordion:assertEquals="#user.other"&gt;and their Other field&lt;/th&gt;<br/>
39
+ &lt;/tr&gt;<br/>
40
+ &lt;tr&gt;<br/>
41
+ &lt;td&gt;george.harrison&lt;/td&gt;<br/>
42
+ &lt;td&gt;dishwasher&lt;/td&gt;<br/>
43
+ &lt;/tr&gt;<br/>
44
+ &lt;tr&gt;<br/>
45
+ &lt;td&gt;ringo.starr&lt;/td&gt;<br/>
46
+ &lt;td&gt;chucknorris&lt;/td&gt;<br/>
47
+ &lt;/tr&gt;<br/>
48
+ &lt;/table&gt;
49
+
50
+ </blockquote>
51
+ <h4> The relevent fragments of the tag are:</h4>
52
+ <ul>
53
+ <li>#users - collection variable. Concordion iterates over this collection as it reads the table. </li>
54
+ <li>#user - iteration variable. Concordion automatically names this variable by singularizing the plural form collection variable. It is updated from the collection by the current table row index.</li>
55
+ <li>assertEquals - on a table header (th) tag, this annotation is copied to all rows beneath it.</li>
56
+ </ul>
57
+ <h4>And here's what it looks like:</h4>
58
+ <blockquote>
59
+ <p>Given these users:</p>
5
60
  <table>
6
61
  <tr>
7
62
  <th concordion:set="#username">Username</th>
@@ -41,6 +96,10 @@
41
96
  <td>chucknorris</td>
42
97
  </tr>
43
98
  </table>
99
+
100
+ </blockquote>
101
+ </span>
102
+
44
103
  </body>
45
104
  </html>
46
105
 
@@ -1,6 +1,29 @@
1
1
  <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
2
  <body>
3
- <p concordion:assertTrue="is_boiling_point(#TEXT)">212</p>
4
- <p concordion:assertTrue="is_boiling_point(#TEXT)">211</p>
3
+
4
+ <span>
5
+ <h1>assertTrue</h1>
6
+ <h4>Here is an example of how to use the <i>assertTrue</i> command.</h4>
7
+ <blockquote>
8
+
9
+ The boiling point of water (in Farenheit) is &lt;p concordion:assertTrue="is_boiling_point(#TEXT)"&gt;212&lt;/p&gt;.
10
+
11
+ </blockquote>
12
+ <h4> The relevent fragments of the tag are:</h4>
13
+ <ul>
14
+ <li>#TEXT - bound to the contents out the tag, in this case 'Goodspeed'</li>
15
+ </ul>
16
+ <h4>And here's what it looks like:</h4>
17
+ <blockquote>
18
+ The boiling point of water (in Farenheit) is <i concordion:assertTrue="is_boiling_point(#TEXT)">212</i>.
19
+ </blockquote>
20
+ <h4>And here's what a failure looks like:</h4>
21
+ <blockquote>
22
+ The boiling point of water (in Farenheit) is<i concordion:assertTrue="is_boiling_point(#TEXT)">211</i>.
23
+ </blockquote>
24
+ </span>
25
+
26
+
27
+
5
28
  </body>
6
29
  </html>
@@ -2,9 +2,6 @@
2
2
  # and open the template in the editor.
3
3
  require 'concordion_test_case'
4
4
  class BasicAssertTrueTest < ConcordionTestCase
5
- def initialize(suite)
6
- super(suite, {:expected_failure_count => 1})
7
- end
8
5
  def expected_failure_count
9
6
  1
10
7
  end
@@ -0,0 +1,42 @@
1
+ <html xmlns:concordion="http://www.concordion.org/2007/concordion">
2
+ <body>
3
+ <span>
4
+ <h1>Rubyish Annotations</h1>
5
+ <h4>Here is an example of some of the ways Ruby-Concordion is <i>rubyish</i>.</h4>
6
+
7
+ <blockquote>
8
+ &lt;span concordion:execute="#result = concat #TEXT, #TEXT"&gt;AA&lt;/span&gt;<br/>
9
+ &lt;span concordion:assertEquals="#result"&gt;AA:AA&lt;/span&gt;<br/>
10
+ &lt;span concordion:assertEquals="no_args"&gt;foo&lt;/span&gt;<br/>
11
+ &lt;span concordion:assertEquals="return_arg #TEXT"&gt;foo&lt;/span&gt;
12
+ </blockquote>
13
+ <h4> The relevent fragments of the tag are:</h4>
14
+ <ul>
15
+ <li>concat #TEXT, #TEXT - argument lists without parentheses.</li>
16
+ <li>no_args - direct method invocations, equivalent to 'no_args()'</li>
17
+ </ul>
18
+ <h4>And here's what it looks like:</h4>
19
+ <blockquote>
20
+ <span concordion:execute="#result = concat #TEXT, #TEXT">AA</span>
21
+ <span concordion:assertEquals="#result">AA:AA</span>
22
+ <span concordion:assertEquals="no_args">foo</span>
23
+ <span concordion:assertEquals="return_arg #TEXT">foo</span>
24
+ </blockquote>
25
+ <h4>And here are some other examples:</h4>
26
+ <blockquote>
27
+
28
+ <span concordion:set="#bar">bar</span>
29
+ <span concordion:set="#baz">baz</span>
30
+ <span concordion:assertEquals="concat #bar, #baz">bar:baz</span>
31
+ <span concordion:execute="#result = concat #baz, #TEXT">zab</span>
32
+ <span concordion:assertEquals="#result">baz:zab</span>
33
+ <span concordion:execute="#result = concat #TEXT, #bar">fed</span>
34
+ <span concordion:assertEquals="#result">fed:bar</span>
35
+ </blockquote>
36
+ </span>
37
+
38
+
39
+
40
+
41
+ </body>
42
+ </html>
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
  require 'concordion_test_case'
3
3
 
4
- class NoParensTest < ConcordionTestCase
4
+ class RubyishTest < ConcordionTestCase
5
5
 
6
6
  def no_args
7
7
  "foo"