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.
- data/Rakefile.rb +6 -6
- data/lib/concordion.rb +15 -0
- data/nbproject/private/private.properties +2 -4
- data/nbproject/private/rake-d.txt +5 -5
- data/nbproject/project.properties +4 -8
- data/nbproject/project.xml +3 -4
- data/tests/basic_assert.html +19 -1
- data/tests/basic_set.html +20 -6
- data/tests/basic_text.html +19 -9
- data/tests/failing.html +20 -5
- data/tests/failing_test.rb +1 -8
- data/tests/link_style_css.html +13 -1
- data/tests/lookahead_assert_true.html +28 -5
- data/tests/mixed.html +18 -1
- data/tests/return_result.html +20 -3
- data/tests/tables/table.html +47 -5
- data/tests/tables/verify_rows.html +60 -1
- data/tests/user-reported/basic_assert_true.html +25 -2
- data/tests/user-reported/basic_assert_true_test.rb +0 -3
- data/tests/user-reported/rubyish.html +42 -0
- data/tests/user-reported/{no_parens_test.rb → rubyish_test.rb} +1 -1
- metadata +16 -225
- data/README +0 -10
- data/html/classes/ConcordionBinder.html +0 -176
- data/html/classes/ConcordionBinder.src/M000042.html +0 -18
- data/html/classes/ConcordionBinder.src/M000043.html +0 -23
- data/html/classes/ConcordionBinder.src/M000044.html +0 -20
- data/html/classes/ConcordionCSS.html +0 -146
- data/html/classes/ConcordionCSS.src/M000100.html +0 -18
- data/html/classes/ConcordionCSS.src/M000101.html +0 -20
- data/html/classes/ConcordionCSSDecorator.html +0 -242
- data/html/classes/ConcordionCSSDecorator.src/M000011.html +0 -25
- data/html/classes/ConcordionCSSDecorator.src/M000012.html +0 -18
- data/html/classes/ConcordionCSSDecorator.src/M000013.html +0 -18
- data/html/classes/ConcordionCSSDecorator.src/M000014.html +0 -18
- data/html/classes/ConcordionCSSDecorator.src/M000015.html +0 -18
- data/html/classes/ConcordionCSSDecorator.src/M000016.html +0 -18
- data/html/classes/ConcordionCSSDecorator.src/M000017.html +0 -20
- data/html/classes/ConcordionCSSDecorator.src/M000018.html +0 -29
- data/html/classes/ConcordionConfigMethods.html +0 -146
- data/html/classes/ConcordionConfigMethods.src/M000123.html +0 -30
- data/html/classes/ConcordionConfigMethods.src/M000124.html +0 -26
- data/html/classes/ConcordionConstants.html +0 -146
- data/html/classes/ConcordionConstants.src/M000121.html +0 -20
- data/html/classes/ConcordionConstants.src/M000122.html +0 -18
- data/html/classes/ConcordionEnvironment.html +0 -212
- data/html/classes/ConcordionEnvironment.src/M000022.html +0 -18
- data/html/classes/ConcordionEnvironment.src/M000023.html +0 -18
- data/html/classes/ConcordionEnvironment.src/M000024.html +0 -18
- data/html/classes/ConcordionEnvironment.src/M000025.html +0 -18
- data/html/classes/ConcordionEnvironment.src/M000026.html +0 -19
- data/html/classes/ConcordionEnvironment.src/M000027.html +0 -19
- data/html/classes/ConcordionErrorCondition.html +0 -179
- data/html/classes/ConcordionErrorCondition.src/M000032.html +0 -22
- data/html/classes/ConcordionErrorCondition.src/M000033.html +0 -25
- data/html/classes/ConcordionInstrumenter.html +0 -152
- data/html/classes/ConcordionInstrumenter.src/M000045.html +0 -30
- data/html/classes/ConcordionInstrumenter.src/M000046.html +0 -22
- data/html/classes/ConcordionInternalTestMethods.html +0 -213
- data/html/classes/ConcordionInternalTestMethods.src/M000094.html +0 -25
- data/html/classes/ConcordionInternalTestMethods.src/M000095.html +0 -23
- data/html/classes/ConcordionInternalTestMethods.src/M000096.html +0 -26
- data/html/classes/ConcordionInternalTestMethods.src/M000097.html +0 -29
- data/html/classes/ConcordionInternalTestMethods.src/M000098.html +0 -22
- data/html/classes/ConcordionInternalTestMethods.src/M000099.html +0 -18
- data/html/classes/ConcordionInvoker.html +0 -327
- data/html/classes/ConcordionInvoker.src/M000058.html +0 -18
- data/html/classes/ConcordionInvoker.src/M000059.html +0 -26
- data/html/classes/ConcordionInvoker.src/M000060.html +0 -23
- data/html/classes/ConcordionInvoker.src/M000061.html +0 -26
- data/html/classes/ConcordionInvoker.src/M000062.html +0 -27
- data/html/classes/ConcordionInvoker.src/M000063.html +0 -22
- data/html/classes/ConcordionInvoker.src/M000064.html +0 -25
- data/html/classes/ConcordionInvoker.src/M000065.html +0 -26
- data/html/classes/ConcordionInvoker.src/M000066.html +0 -18
- data/html/classes/ConcordionInvoker.src/M000067.html +0 -18
- data/html/classes/ConcordionInvoker.src/M000068.html +0 -18
- data/html/classes/ConcordionInvoker.src/M000069.html +0 -26
- data/html/classes/ConcordionInvoker.src/M000070.html +0 -35
- data/html/classes/ConcordionLookaheadHandler.html +0 -152
- data/html/classes/ConcordionLookaheadHandler.src/M000028.html +0 -18
- data/html/classes/ConcordionLookaheadHandler.src/M000029.html +0 -22
- data/html/classes/ConcordionParseResult.html +0 -369
- data/html/classes/ConcordionParseResult.src/M000076.html +0 -21
- data/html/classes/ConcordionParseResult.src/M000077.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000078.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000079.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000080.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000081.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000082.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000083.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000084.html +0 -19
- data/html/classes/ConcordionParseResult.src/M000085.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000086.html +0 -18
- data/html/classes/ConcordionParseResult.src/M000087.html +0 -21
- data/html/classes/ConcordionParseResult.src/M000088.html +0 -22
- data/html/classes/ConcordionParseResult.src/M000089.html +0 -22
- data/html/classes/ConcordionParser.html +0 -214
- data/html/classes/ConcordionParser.src/M000002.html +0 -21
- data/html/classes/ConcordionParser.src/M000003.html +0 -20
- data/html/classes/ConcordionParser.src/M000004.html +0 -20
- data/html/classes/ConcordionParser.src/M000005.html +0 -26
- data/html/classes/ConcordionProcessor.html +0 -176
- data/html/classes/ConcordionProcessor.src/M000019.html +0 -19
- data/html/classes/ConcordionProcessor.src/M000020.html +0 -22
- data/html/classes/ConcordionProcessor.src/M000021.html +0 -18
- data/html/classes/ConcordionReader.html +0 -144
- data/html/classes/ConcordionReader.src/M000001.html +0 -18
- data/html/classes/ConcordionState.html +0 -299
- data/html/classes/ConcordionState.src/M000052.html +0 -18
- data/html/classes/ConcordionState.src/M000053.html +0 -23
- data/html/classes/ConcordionState.src/M000054.html +0 -18
- data/html/classes/ConcordionState.src/M000055.html +0 -18
- data/html/classes/ConcordionState.src/M000056.html +0 -25
- data/html/classes/ConcordionState.src/M000057.html +0 -28
- data/html/classes/ConcordionStringUtility.html +0 -259
- data/html/classes/ConcordionStringUtility.src/M000102.html +0 -18
- data/html/classes/ConcordionStringUtility.src/M000103.html +0 -18
- data/html/classes/ConcordionStringUtility.src/M000104.html +0 -18
- data/html/classes/ConcordionStringUtility.src/M000105.html +0 -18
- data/html/classes/ConcordionStringUtility.src/M000106.html +0 -18
- data/html/classes/ConcordionStringUtility.src/M000107.html +0 -18
- data/html/classes/ConcordionStringUtility.src/M000108.html +0 -43
- data/html/classes/ConcordionStringUtility.src/M000109.html +0 -18
- data/html/classes/ConcordionStringUtility.src/M000110.html +0 -18
- data/html/classes/ConcordionStringWriter.html +0 -165
- data/html/classes/ConcordionStringWriter.src/M000030.html +0 -19
- data/html/classes/ConcordionStringWriter.src/M000031.html +0 -18
- data/html/classes/ConcordionTestCase.html +0 -220
- data/html/classes/ConcordionTestCase.src/M000006.html +0 -19
- data/html/classes/ConcordionTestCase.src/M000007.html +0 -19
- data/html/classes/ConcordionTestCase.src/M000008.html +0 -19
- data/html/classes/ConcordionTestCase.src/M000009.html +0 -18
- data/html/classes/ConcordionTestCase.src/M000010.html +0 -18
- data/html/classes/ConcordionTestMethods.html +0 -151
- data/html/classes/ConcordionTestMethods.src/M000092.html +0 -24
- data/html/classes/ConcordionUtility.html +0 -229
- data/html/classes/ConcordionUtility.src/M000114.html +0 -18
- data/html/classes/ConcordionUtility.src/M000115.html +0 -34
- data/html/classes/ConcordionUtility.src/M000116.html +0 -22
- data/html/classes/ConcordionUtility.src/M000117.html +0 -18
- data/html/classes/ConcordionUtility.src/M000118.html +0 -22
- data/html/classes/ConcordionUtility.src/M000119.html +0 -18
- data/html/classes/ConcordionUtility.src/M000120.html +0 -25
- data/html/classes/ConcordionVerifier.html +0 -219
- data/html/classes/ConcordionVerifier.src/M000071.html +0 -20
- data/html/classes/ConcordionVerifier.src/M000072.html +0 -20
- data/html/classes/ConcordionVerifier.src/M000073.html +0 -23
- data/html/classes/ConcordionVerifier.src/M000074.html +0 -22
- data/html/classes/ConcordionVerifier.src/M000075.html +0 -28
- data/html/classes/ConcordionWriter.html +0 -244
- data/html/classes/ConcordionWriter.src/M000034.html +0 -18
- data/html/classes/ConcordionWriter.src/M000035.html +0 -20
- data/html/classes/ConcordionWriter.src/M000036.html +0 -18
- data/html/classes/ConcordionWriter.src/M000037.html +0 -18
- data/html/classes/ConcordionWriter.src/M000038.html +0 -21
- data/html/classes/ConcordionWriter.src/M000039.html +0 -22
- data/html/classes/ConcordionWriter.src/M000040.html +0 -18
- data/html/classes/ConcordionWriter.src/M000041.html +0 -18
- data/html/classes/FailConditionally.html +0 -131
- data/html/classes/FailConditionally.src/M000090.html +0 -22
- data/html/classes/GoldmasterTestCase.html +0 -208
- data/html/classes/GoldmasterTestCase.src/M000047.html +0 -22
- data/html/classes/GoldmasterTestCase.src/M000048.html +0 -18
- data/html/classes/GoldmasterTestCase.src/M000049.html +0 -18
- data/html/classes/GoldmasterTestCase.src/M000050.html +0 -18
- data/html/classes/GoldmasterTestCase.src/M000051.html +0 -31
- data/html/classes/LoaderHelper.html +0 -138
- data/html/classes/LoaderHelper.src/M000093.html +0 -24
- data/html/classes/PluralToSingularUtility.html +0 -131
- data/html/classes/PluralToSingularUtility.src/M000091.html +0 -18
- data/html/classes/SnakeCaseUtility.html +0 -161
- data/html/classes/SnakeCaseUtility.src/M000111.html +0 -23
- data/html/classes/SnakeCaseUtility.src/M000112.html +0 -20
- data/html/classes/SnakeCaseUtility.src/M000113.html +0 -18
- data/html/created.rid +0 -1
- data/html/files/README.html +0 -123
- data/html/files/lib/concordion_binder_rb.html +0 -108
- data/html/files/lib/concordion_constants_rb.html +0 -101
- data/html/files/lib/concordion_css_decorator_rb.html +0 -109
- data/html/files/lib/concordion_css_rb.html +0 -101
- data/html/files/lib/concordion_environment_rb.html +0 -101
- data/html/files/lib/concordion_error_condition_rb.html +0 -108
- data/html/files/lib/concordion_instrumenter_rb.html +0 -101
- data/html/files/lib/concordion_invoker_rb.html +0 -109
- data/html/files/lib/concordion_lookahead_handler_rb.html +0 -101
- data/html/files/lib/concordion_parse_result_rb.html +0 -108
- data/html/files/lib/concordion_parser_rb.html +0 -110
- data/html/files/lib/concordion_processor_rb.html +0 -108
- data/html/files/lib/concordion_rb.html +0 -108
- data/html/files/lib/concordion_reader_rb.html +0 -108
- data/html/files/lib/concordion_state_rb.html +0 -112
- data/html/files/lib/concordion_string_utility_rb.html +0 -101
- data/html/files/lib/concordion_string_writer_rb.html +0 -101
- data/html/files/lib/concordion_test_case_rb.html +0 -119
- data/html/files/lib/concordion_test_methods_rb.html +0 -125
- data/html/files/lib/concordion_utility_rb.html +0 -109
- data/html/files/lib/concordion_verifier_rb.html +0 -108
- data/html/files/lib/concordion_writer_rb.html +0 -101
- data/html/files/lib/goldmaster_test_case_rb.html +0 -110
- data/html/files/lib/loader_helper_rb.html +0 -108
- data/html/files/lib/rcor_rb.html +0 -108
- data/html/fr_class_index.html +0 -54
- data/html/fr_file_index.html +0 -52
- data/html/fr_method_index.html +0 -150
- data/html/index.html +0 -24
- data/html/rdoc-style.css +0 -208
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.xml +0 -4
- 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.
|
|
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://
|
|
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' <<
|
|
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.
|
|
2
|
-
file.reference.
|
|
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=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.
|
|
14
|
-
pkg/concordion-0.9.
|
|
15
|
-
pkg/concordion-0.9.
|
|
16
|
-
pkg/concordion-0.9.
|
|
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.
|
|
2
|
-
file.reference.
|
|
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.
|
|
10
|
-
src.
|
|
11
|
-
test.tests.dir=tests
|
|
6
|
+
src.dir=${file.reference.trunk-lib}
|
|
7
|
+
test.src.dir=${file.reference.trunk-tests}
|
data/nbproject/project.xml
CHANGED
|
@@ -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>
|
|
6
|
+
<name>Concordion</name>
|
|
7
7
|
<source-roots>
|
|
8
|
-
<root id="src.
|
|
9
|
-
<root id="src.lib.dir"/>
|
|
8
|
+
<root id="src.dir"/>
|
|
10
9
|
</source-roots>
|
|
11
10
|
<test-roots>
|
|
12
|
-
<root id="test.
|
|
11
|
+
<root id="test.src.dir"/>
|
|
13
12
|
</test-roots>
|
|
14
13
|
</data>
|
|
15
14
|
</configuration>
|
data/tests/basic_assert.html
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
|
2
2
|
<body>
|
|
3
|
-
<
|
|
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 <b concordion:assertEquals="getGreeting()">Hello World!</b>.
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 <span concordion:set="#username">Chuck Norris</span><br/>
|
|
8
|
+
Then the system should greet me with <span concordion:assertEquals="greetingFor(#username)">Hello Chuck Norris, you nancy-boy.</span>
|
|
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
|
-
|
|
9
|
-
it should be in the output.
|
|
23
|
+
</span>
|
|
10
24
|
</body>
|
|
11
25
|
</html>
|
data/tests/basic_text.html
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
|
2
2
|
<body>
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 <quote concordion:execute="#result = concat(#TEXT,#TEXT)">Goodspeed</quote> with itself <br/>
|
|
8
|
+
the result should be: <quote concordion:assertEquals="#result">Goodspeed:Goodspeed</quote>.
|
|
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
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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 <span concordion:assertEquals="wrong_value()">right value</span>.
|
|
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>
|
data/tests/failing_test.rb
CHANGED
data/tests/link_style_css.html
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
|
2
2
|
<body>
|
|
3
|
-
<
|
|
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
|
-
|
|
4
|
-
|
|
3
|
+
<span>
|
|
4
|
+
<h1>Lookahead</h1>
|
|
5
|
+
<h4>Concordion will <i>lookahead</i> in nested tags to bind variables.</h4>
|
|
6
|
+
<blockquote>
|
|
7
|
+
<p>When <span concordion:set="#firstName">Bob</span> logs in he will be greeted with: <br/>
|
|
8
|
+
<span concordion:assertEquals="greeting_for(#firstName)">Hello Bob!</span> <br/>
|
|
9
|
+
</p> <br/>
|
|
10
|
+
<p>The first name <br/>
|
|
11
|
+
<span concordion:assertTrue="starts_with(#firstName, #letter)">starts <br/>
|
|
12
|
+
with <b concordion:set="#letter">B</b></span>.<br/>
|
|
13
|
+
</p>
|
|
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)">
|
|
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
|
-
|
|
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 <span> concordion:assertEquals="easy">as pie</span>
|
|
8
|
+
</blockquote>
|
|
9
|
+
<h4> The relevent fragments of the fixture are:</h4>
|
|
10
|
+
<ul>
|
|
11
|
+
<li>class MixedTest < 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>
|
data/tests/return_result.html
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
1
|
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
|
2
2
|
<body>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 <quote concordion:execute="#result = split_name(#TEXT)">Ben Goodspeed</quote><br/>
|
|
8
|
+
can return a real object with properties like 'first' which should be <quote concordion:assertEquals="#result.first">Ben</quote><br/>
|
|
9
|
+
and 'last' which is <quote concordion:assertEquals="#result.last">Goodspeed</quote><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>
|
data/tests/tables/table.html
CHANGED
|
@@ -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
|
+
<table> <br/>
|
|
10
|
+
<tr><br/>
|
|
11
|
+
<th concordion:execute="#row_result = split_by_colons(#TEXT)">Given Text To Split By Colons and Uppercase:</th><br/>
|
|
12
|
+
<th concordion:assertEquals="#row_result.alpha">The First Field is:</th><br/>
|
|
13
|
+
<th concordion:assertEquals="#row_result.beta">The Second Field is:</th><br/>
|
|
14
|
+
<th concordion:assertEquals="#row_result.gamma">The Third Field is:</th><br/>
|
|
15
|
+
</tr><br/>
|
|
16
|
+
<br/>
|
|
17
|
+
<tr><br/>
|
|
18
|
+
<td>a:b:c</td><br/>
|
|
19
|
+
<td>A</td><br/>
|
|
20
|
+
<td>B</td><br/>
|
|
21
|
+
<td>C</td><br/>
|
|
22
|
+
</tr><br/>
|
|
23
|
+
|
|
24
|
+
<tr><br/>
|
|
25
|
+
<td>d:e:f</td><br/>
|
|
26
|
+
<td>D</td><br/>
|
|
27
|
+
<td>E</td><br/>
|
|
28
|
+
<td>F</td><br/>
|
|
29
|
+
</tr><br/>
|
|
30
|
+
|
|
31
|
+
</table><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
|
+
<p>Given these users:</p><br/>
|
|
10
|
+
<table><br/>
|
|
11
|
+
<tr><br/>
|
|
12
|
+
<th concordion:set="#username">Username</th><br/>
|
|
13
|
+
<th concordion:execute="setupUser(#username, #TEXT)">Other</th><br/>
|
|
14
|
+
</tr><br/>
|
|
15
|
+
<tr><br/>
|
|
16
|
+
<td>john.lennon</td><br/>
|
|
17
|
+
<td>monkeys</td><br/>
|
|
18
|
+
</tr><br/>
|
|
19
|
+
<tr><br/>
|
|
20
|
+
<td>ringo.starr</td><br/>
|
|
21
|
+
<td>chucknorris</td><br/>
|
|
22
|
+
</tr><br/>
|
|
23
|
+
<tr><br/>
|
|
24
|
+
<td>george.harrison</td><br/>
|
|
25
|
+
<td>dishwasher</td><br/>
|
|
26
|
+
</tr><br/>
|
|
27
|
+
<tr><br/>
|
|
28
|
+
<td>paul.mcartney</td><br/>
|
|
29
|
+
<td>flamingweasel</td><br/>
|
|
30
|
+
</tr><br/>
|
|
31
|
+
</table><br/>
|
|
32
|
+
<br/>
|
|
33
|
+
<p>Searching for "<b concordion:set="#searchString">arr</b>" will return:</p><br/>
|
|
34
|
+
<br/>
|
|
35
|
+
<table concordion:verifyRows="#users = getSearchResultsFor(#searchString)"><br/>
|
|
36
|
+
<tr><br/>
|
|
37
|
+
<th concordion:assertEquals="#user.name">Matching Usernames</th><br/>
|
|
38
|
+
<th concordion:assertEquals="#user.other">and their Other field</th><br/>
|
|
39
|
+
</tr><br/>
|
|
40
|
+
<tr><br/>
|
|
41
|
+
<td>george.harrison</td><br/>
|
|
42
|
+
<td>dishwasher</td><br/>
|
|
43
|
+
</tr><br/>
|
|
44
|
+
<tr><br/>
|
|
45
|
+
<td>ringo.starr</td><br/>
|
|
46
|
+
<td>chucknorris</td><br/>
|
|
47
|
+
</tr><br/>
|
|
48
|
+
</table>
|
|
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
|
-
|
|
4
|
-
|
|
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 <p concordion:assertTrue="is_boiling_point(#TEXT)">212</p>.
|
|
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>
|
|
@@ -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
|
+
<span concordion:execute="#result = concat #TEXT, #TEXT">AA</span><br/>
|
|
9
|
+
<span concordion:assertEquals="#result">AA:AA</span><br/>
|
|
10
|
+
<span concordion:assertEquals="no_args">foo</span><br/>
|
|
11
|
+
<span concordion:assertEquals="return_arg #TEXT">foo</span>
|
|
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>
|