concordion 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README +10 -0
- data/Rakefile.rb +69 -0
- data/html/classes/ConcordionBinder.html +176 -0
- data/html/classes/ConcordionBinder.src/M000042.html +18 -0
- data/html/classes/ConcordionBinder.src/M000043.html +23 -0
- data/html/classes/ConcordionBinder.src/M000044.html +20 -0
- data/html/classes/ConcordionCSS.html +146 -0
- data/html/classes/ConcordionCSS.src/M000100.html +18 -0
- data/html/classes/ConcordionCSS.src/M000101.html +20 -0
- data/html/classes/ConcordionCSSDecorator.html +242 -0
- data/html/classes/ConcordionCSSDecorator.src/M000011.html +25 -0
- data/html/classes/ConcordionCSSDecorator.src/M000012.html +18 -0
- data/html/classes/ConcordionCSSDecorator.src/M000013.html +18 -0
- data/html/classes/ConcordionCSSDecorator.src/M000014.html +18 -0
- data/html/classes/ConcordionCSSDecorator.src/M000015.html +18 -0
- data/html/classes/ConcordionCSSDecorator.src/M000016.html +18 -0
- data/html/classes/ConcordionCSSDecorator.src/M000017.html +20 -0
- data/html/classes/ConcordionCSSDecorator.src/M000018.html +29 -0
- data/html/classes/ConcordionConfigMethods.html +146 -0
- data/html/classes/ConcordionConfigMethods.src/M000123.html +30 -0
- data/html/classes/ConcordionConfigMethods.src/M000124.html +26 -0
- data/html/classes/ConcordionConstants.html +146 -0
- data/html/classes/ConcordionConstants.src/M000121.html +20 -0
- data/html/classes/ConcordionConstants.src/M000122.html +18 -0
- data/html/classes/ConcordionEnvironment.html +212 -0
- data/html/classes/ConcordionEnvironment.src/M000022.html +18 -0
- data/html/classes/ConcordionEnvironment.src/M000023.html +18 -0
- data/html/classes/ConcordionEnvironment.src/M000024.html +18 -0
- data/html/classes/ConcordionEnvironment.src/M000025.html +18 -0
- data/html/classes/ConcordionEnvironment.src/M000026.html +19 -0
- data/html/classes/ConcordionEnvironment.src/M000027.html +19 -0
- data/html/classes/ConcordionErrorCondition.html +179 -0
- data/html/classes/ConcordionErrorCondition.src/M000032.html +22 -0
- data/html/classes/ConcordionErrorCondition.src/M000033.html +25 -0
- data/html/classes/ConcordionInstrumenter.html +152 -0
- data/html/classes/ConcordionInstrumenter.src/M000045.html +30 -0
- data/html/classes/ConcordionInstrumenter.src/M000046.html +22 -0
- data/html/classes/ConcordionInternalTestMethods.html +213 -0
- data/html/classes/ConcordionInternalTestMethods.src/M000094.html +25 -0
- data/html/classes/ConcordionInternalTestMethods.src/M000095.html +23 -0
- data/html/classes/ConcordionInternalTestMethods.src/M000096.html +26 -0
- data/html/classes/ConcordionInternalTestMethods.src/M000097.html +29 -0
- data/html/classes/ConcordionInternalTestMethods.src/M000098.html +22 -0
- data/html/classes/ConcordionInternalTestMethods.src/M000099.html +18 -0
- data/html/classes/ConcordionInvoker.html +327 -0
- data/html/classes/ConcordionInvoker.src/M000058.html +18 -0
- data/html/classes/ConcordionInvoker.src/M000059.html +26 -0
- data/html/classes/ConcordionInvoker.src/M000060.html +23 -0
- data/html/classes/ConcordionInvoker.src/M000061.html +26 -0
- data/html/classes/ConcordionInvoker.src/M000062.html +27 -0
- data/html/classes/ConcordionInvoker.src/M000063.html +22 -0
- data/html/classes/ConcordionInvoker.src/M000064.html +25 -0
- data/html/classes/ConcordionInvoker.src/M000065.html +26 -0
- data/html/classes/ConcordionInvoker.src/M000066.html +18 -0
- data/html/classes/ConcordionInvoker.src/M000067.html +18 -0
- data/html/classes/ConcordionInvoker.src/M000068.html +18 -0
- data/html/classes/ConcordionInvoker.src/M000069.html +26 -0
- data/html/classes/ConcordionInvoker.src/M000070.html +35 -0
- data/html/classes/ConcordionLookaheadHandler.html +152 -0
- data/html/classes/ConcordionLookaheadHandler.src/M000028.html +18 -0
- data/html/classes/ConcordionLookaheadHandler.src/M000029.html +22 -0
- data/html/classes/ConcordionParseResult.html +369 -0
- data/html/classes/ConcordionParseResult.src/M000076.html +21 -0
- data/html/classes/ConcordionParseResult.src/M000077.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000078.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000079.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000080.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000081.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000082.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000083.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000084.html +19 -0
- data/html/classes/ConcordionParseResult.src/M000085.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000086.html +18 -0
- data/html/classes/ConcordionParseResult.src/M000087.html +21 -0
- data/html/classes/ConcordionParseResult.src/M000088.html +22 -0
- data/html/classes/ConcordionParseResult.src/M000089.html +22 -0
- data/html/classes/ConcordionParser.html +214 -0
- data/html/classes/ConcordionParser.src/M000002.html +21 -0
- data/html/classes/ConcordionParser.src/M000003.html +20 -0
- data/html/classes/ConcordionParser.src/M000004.html +20 -0
- data/html/classes/ConcordionParser.src/M000005.html +26 -0
- data/html/classes/ConcordionProcessor.html +176 -0
- data/html/classes/ConcordionProcessor.src/M000019.html +19 -0
- data/html/classes/ConcordionProcessor.src/M000020.html +22 -0
- data/html/classes/ConcordionProcessor.src/M000021.html +18 -0
- data/html/classes/ConcordionReader.html +144 -0
- data/html/classes/ConcordionReader.src/M000001.html +18 -0
- data/html/classes/ConcordionState.html +299 -0
- data/html/classes/ConcordionState.src/M000052.html +18 -0
- data/html/classes/ConcordionState.src/M000053.html +23 -0
- data/html/classes/ConcordionState.src/M000054.html +18 -0
- data/html/classes/ConcordionState.src/M000055.html +18 -0
- data/html/classes/ConcordionState.src/M000056.html +25 -0
- data/html/classes/ConcordionState.src/M000057.html +28 -0
- data/html/classes/ConcordionStringUtility.html +259 -0
- data/html/classes/ConcordionStringUtility.src/M000102.html +18 -0
- data/html/classes/ConcordionStringUtility.src/M000103.html +18 -0
- data/html/classes/ConcordionStringUtility.src/M000104.html +18 -0
- data/html/classes/ConcordionStringUtility.src/M000105.html +18 -0
- data/html/classes/ConcordionStringUtility.src/M000106.html +18 -0
- data/html/classes/ConcordionStringUtility.src/M000107.html +18 -0
- data/html/classes/ConcordionStringUtility.src/M000108.html +43 -0
- data/html/classes/ConcordionStringUtility.src/M000109.html +18 -0
- data/html/classes/ConcordionStringUtility.src/M000110.html +18 -0
- data/html/classes/ConcordionStringWriter.html +165 -0
- data/html/classes/ConcordionStringWriter.src/M000030.html +19 -0
- data/html/classes/ConcordionStringWriter.src/M000031.html +18 -0
- data/html/classes/ConcordionTestCase.html +220 -0
- data/html/classes/ConcordionTestCase.src/M000006.html +19 -0
- data/html/classes/ConcordionTestCase.src/M000007.html +19 -0
- data/html/classes/ConcordionTestCase.src/M000008.html +19 -0
- data/html/classes/ConcordionTestCase.src/M000009.html +18 -0
- data/html/classes/ConcordionTestCase.src/M000010.html +18 -0
- data/html/classes/ConcordionTestMethods.html +151 -0
- data/html/classes/ConcordionTestMethods.src/M000092.html +24 -0
- data/html/classes/ConcordionUtility.html +229 -0
- data/html/classes/ConcordionUtility.src/M000114.html +18 -0
- data/html/classes/ConcordionUtility.src/M000115.html +34 -0
- data/html/classes/ConcordionUtility.src/M000116.html +22 -0
- data/html/classes/ConcordionUtility.src/M000117.html +18 -0
- data/html/classes/ConcordionUtility.src/M000118.html +22 -0
- data/html/classes/ConcordionUtility.src/M000119.html +18 -0
- data/html/classes/ConcordionUtility.src/M000120.html +25 -0
- data/html/classes/ConcordionVerifier.html +219 -0
- data/html/classes/ConcordionVerifier.src/M000071.html +20 -0
- data/html/classes/ConcordionVerifier.src/M000072.html +20 -0
- data/html/classes/ConcordionVerifier.src/M000073.html +23 -0
- data/html/classes/ConcordionVerifier.src/M000074.html +22 -0
- data/html/classes/ConcordionVerifier.src/M000075.html +28 -0
- data/html/classes/ConcordionWriter.html +244 -0
- data/html/classes/ConcordionWriter.src/M000034.html +18 -0
- data/html/classes/ConcordionWriter.src/M000035.html +20 -0
- data/html/classes/ConcordionWriter.src/M000036.html +18 -0
- data/html/classes/ConcordionWriter.src/M000037.html +18 -0
- data/html/classes/ConcordionWriter.src/M000038.html +21 -0
- data/html/classes/ConcordionWriter.src/M000039.html +22 -0
- data/html/classes/ConcordionWriter.src/M000040.html +18 -0
- data/html/classes/ConcordionWriter.src/M000041.html +18 -0
- data/html/classes/FailConditionally.html +131 -0
- data/html/classes/FailConditionally.src/M000090.html +22 -0
- data/html/classes/GoldmasterTestCase.html +208 -0
- data/html/classes/GoldmasterTestCase.src/M000047.html +22 -0
- data/html/classes/GoldmasterTestCase.src/M000048.html +18 -0
- data/html/classes/GoldmasterTestCase.src/M000049.html +18 -0
- data/html/classes/GoldmasterTestCase.src/M000050.html +18 -0
- data/html/classes/GoldmasterTestCase.src/M000051.html +31 -0
- data/html/classes/LoaderHelper.html +138 -0
- data/html/classes/LoaderHelper.src/M000093.html +24 -0
- data/html/classes/PluralToSingularUtility.html +131 -0
- data/html/classes/PluralToSingularUtility.src/M000091.html +18 -0
- data/html/classes/SnakeCaseUtility.html +161 -0
- data/html/classes/SnakeCaseUtility.src/M000111.html +23 -0
- data/html/classes/SnakeCaseUtility.src/M000112.html +20 -0
- data/html/classes/SnakeCaseUtility.src/M000113.html +18 -0
- data/html/created.rid +1 -0
- data/html/files/README.html +123 -0
- data/html/files/lib/concordion_binder_rb.html +108 -0
- data/html/files/lib/concordion_constants_rb.html +101 -0
- data/html/files/lib/concordion_css_decorator_rb.html +109 -0
- data/html/files/lib/concordion_css_rb.html +101 -0
- data/html/files/lib/concordion_environment_rb.html +101 -0
- data/html/files/lib/concordion_error_condition_rb.html +108 -0
- data/html/files/lib/concordion_instrumenter_rb.html +101 -0
- data/html/files/lib/concordion_invoker_rb.html +109 -0
- data/html/files/lib/concordion_lookahead_handler_rb.html +101 -0
- data/html/files/lib/concordion_parse_result_rb.html +108 -0
- data/html/files/lib/concordion_parser_rb.html +110 -0
- data/html/files/lib/concordion_processor_rb.html +108 -0
- data/html/files/lib/concordion_rb.html +108 -0
- data/html/files/lib/concordion_reader_rb.html +108 -0
- data/html/files/lib/concordion_state_rb.html +112 -0
- data/html/files/lib/concordion_string_utility_rb.html +101 -0
- data/html/files/lib/concordion_string_writer_rb.html +101 -0
- data/html/files/lib/concordion_test_case_rb.html +119 -0
- data/html/files/lib/concordion_test_methods_rb.html +125 -0
- data/html/files/lib/concordion_utility_rb.html +109 -0
- data/html/files/lib/concordion_verifier_rb.html +108 -0
- data/html/files/lib/concordion_writer_rb.html +101 -0
- data/html/files/lib/goldmaster_test_case_rb.html +110 -0
- data/html/files/lib/loader_helper_rb.html +108 -0
- data/html/files/lib/rcor_rb.html +108 -0
- data/html/fr_class_index.html +54 -0
- data/html/fr_file_index.html +52 -0
- data/html/fr_method_index.html +150 -0
- data/html/index.html +24 -0
- data/html/rdoc-style.css +208 -0
- data/lib/concordion.rb +2 -0
- data/lib/concordion_binder.rb +24 -0
- data/lib/concordion_constants.rb +13 -0
- data/lib/concordion_css.rb +179 -0
- data/lib/concordion_css_decorator.rb +58 -0
- data/lib/concordion_environment.rb +27 -0
- data/lib/concordion_error_condition.rb +26 -0
- data/lib/concordion_instrumenter.rb +30 -0
- data/lib/concordion_invoker.rb +137 -0
- data/lib/concordion_lookahead_handler.rb +17 -0
- data/lib/concordion_parse_result.rb +72 -0
- data/lib/concordion_parser.rb +47 -0
- data/lib/concordion_processor.rb +25 -0
- data/lib/concordion_reader.rb +10 -0
- data/lib/concordion_state.rb +78 -0
- data/lib/concordion_string_utility.rb +97 -0
- data/lib/concordion_string_writer.rb +13 -0
- data/lib/concordion_test_case.rb +47 -0
- data/lib/concordion_test_methods.rb +132 -0
- data/lib/concordion_utility.rb +70 -0
- data/lib/concordion_verifier.rb +50 -0
- data/lib/concordion_writer.rb +43 -0
- data/lib/goldmaster_test_case.rb +55 -0
- data/lib/loader_helper.rb +16 -0
- data/lib/rcor.rb +3 -0
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +4 -0
- data/nbproject/private/private.xml +4 -0
- data/nbproject/private/rake-d.txt +21 -0
- data/nbproject/project.properties +11 -0
- data/nbproject/project.xml +16 -0
- data/test-lib/single_row_result.rb +9 -0
- data/test-lib/user.rb +8 -0
- data/tests/basic_assert.html +5 -0
- data/tests/basic_assert_test.rb +9 -0
- data/tests/basic_set.html +11 -0
- data/tests/basic_set_test.rb +8 -0
- data/tests/basic_text.html +14 -0
- data/tests/basic_text_test.rb +23 -0
- data/tests/concordion/concordion_css_decorator_test.rb +28 -0
- data/tests/concordion/concordion_environment_test.rb +44 -0
- data/tests/concordion/concordion_parse_result_test.rb +51 -0
- data/tests/concordion/concordion_reader_test.rb +15 -0
- data/tests/concordion/concordion_state_test.rb +38 -0
- data/tests/concordion/concordion_string_writer_test.rb +13 -0
- data/tests/concordion/concordion_utility_test.rb +135 -0
- data/tests/concordion/concordion_verifier_test.rb +38 -0
- data/tests/concordion/concordion_writer_test.rb +26 -0
- data/tests/concordion/goldmaster_test_case_test.rb +24 -0
- data/tests/concordion.css +2 -0
- data/tests/failing.html +9 -0
- data/tests/failing_test.rb +22 -0
- data/tests/goldmasters/failing_with_subclass.html +6 -0
- data/tests/goldmasters/failing_with_subclass_goldmaster.html +170 -0
- data/tests/goldmasters/failing_with_subclass_test.rb +24 -0
- data/tests/goldmasters/goldmaster_assert_true_failing.html +5 -0
- data/tests/goldmasters/goldmaster_assert_true_failing_goldmaster.html +169 -0
- data/tests/goldmasters/goldmaster_assert_true_failing_test.rb +14 -0
- data/tests/goldmasters/goldmaster_failing.html +45 -0
- data/tests/goldmasters/goldmaster_failing_goldmaster.html +209 -0
- data/tests/goldmasters/goldmaster_failing_test.rb +37 -0
- data/tests/goldmasters/goldmaster_malformed.html +7 -0
- data/tests/goldmasters/goldmaster_malformed_goldmaster.html +171 -0
- data/tests/goldmasters/goldmaster_malformed_test.rb +11 -0
- data/tests/goldmasters/goldmaster_passing.html +5 -0
- data/tests/goldmasters/goldmaster_passing_goldmaster.html +169 -0
- data/tests/goldmasters/goldmaster_passing_test.rb +9 -0
- data/tests/goldmasters/goldmaster_table.html +46 -0
- data/tests/goldmasters/goldmaster_table_bug.html +12 -0
- data/tests/goldmasters/goldmaster_table_bug_goldmaster.html +176 -0
- data/tests/goldmasters/goldmaster_table_bug_test.rb +24 -0
- data/tests/goldmasters/goldmaster_table_goldmaster.html +210 -0
- data/tests/goldmasters/goldmaster_table_test.rb +17 -0
- data/tests/image.html +5 -0
- data/tests/image.jpg +0 -0
- data/tests/image_test.rb +9 -0
- data/tests/link_style_css.html +5 -0
- data/tests/link_style_css_test.rb +16 -0
- data/tests/lookahead_assert_true.html +25 -0
- data/tests/lookahead_assert_true_test.rb +17 -0
- data/tests/mixed.html +5 -0
- data/tests/mixed_test.rb +19 -0
- data/tests/nested_element_lookahead.html +9 -0
- data/tests/nested_element_lookahead_test.rb +8 -0
- data/tests/numbers.html +5 -0
- data/tests/numbers_test.rb +11 -0
- data/tests/processes_elements_in_sorted_order.html +12 -0
- data/tests/processes_elements_in_sorted_order_test.rb +13 -0
- data/tests/return_result.html +7 -0
- data/tests/return_result_test.rb +17 -0
- data/tests/tables/single_row_table.html +13 -0
- data/tests/tables/single_row_table_test.rb +9 -0
- data/tests/tables/table.html +28 -0
- data/tests/tables/table_test.rb +9 -0
- data/tests/tables/test_helper.rb +9 -0
- data/tests/tables/verify_rows.html +46 -0
- data/tests/tables/verify_rows_scsr.html +27 -0
- data/tests/tables/verify_rows_scsr_test.rb +17 -0
- data/tests/tables/verify_rows_simple.html +14 -0
- data/tests/tables/verify_rows_simple_test.rb +17 -0
- data/tests/tables/verify_rows_test.rb +16 -0
- data/tests/user-reported/apostrophe.html +7 -0
- data/tests/user-reported/apostrophe_test.rb +18 -0
- data/tests/user-reported/ariel_example.html +13 -0
- data/tests/user-reported/ariel_example_test.rb +36 -0
- data/tests/user-reported/attr_assert.html +7 -0
- data/tests/user-reported/attr_assert_test.rb +13 -0
- data/tests/user-reported/basic_assert_true.html +6 -0
- data/tests/user-reported/basic_assert_true_test.rb +15 -0
- data/tests/user-reported/no_parens.html +15 -0
- data/tests/user-reported/no_parens_test.rb +20 -0
- metadata +403 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'concordion_test_case'
|
3
|
+
|
4
|
+
class ReturnResultTest < ConcordionTestCase
|
5
|
+
def split_name(name)
|
6
|
+
ar = ArbitraryResult.new
|
7
|
+
split = name.split(" ")
|
8
|
+
ar.first = split[0]
|
9
|
+
ar.last = split[1]
|
10
|
+
|
11
|
+
ar
|
12
|
+
end
|
13
|
+
|
14
|
+
class ArbitraryResult
|
15
|
+
attr_accessor :first, :last
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<td concordion:execute="#row_result = split_by_colons(#TEXT)">a:b:c</td>
|
6
|
+
<td concordion:assertEquals="#row_result.alpha">A</td>
|
7
|
+
<td concordion:assertEquals="#row_result.beta">B</td>
|
8
|
+
<td concordion:assertEquals="#row_result.gamma">C</td>
|
9
|
+
</tr>
|
10
|
+
|
11
|
+
</table>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<table>
|
4
|
+
<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>
|
9
|
+
</tr>
|
10
|
+
|
11
|
+
<tr>
|
12
|
+
<td>a:b:c</td>
|
13
|
+
<td>A</td>
|
14
|
+
<td>B</td>
|
15
|
+
<td>C</td>
|
16
|
+
</tr>
|
17
|
+
|
18
|
+
<tr>
|
19
|
+
<td>d:e:f</td>
|
20
|
+
<td>D</td>
|
21
|
+
<td>E</td>
|
22
|
+
<td>F</td>
|
23
|
+
</tr>
|
24
|
+
|
25
|
+
</table>
|
26
|
+
|
27
|
+
</body>
|
28
|
+
</html>
|
@@ -0,0 +1,46 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<p>Given these users:</p>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<tr>
|
7
|
+
<th concordion:set="#username">Username</th>
|
8
|
+
<th concordion:execute="setupUser(#username, #TEXT)">Other</th>
|
9
|
+
</tr>
|
10
|
+
<tr>
|
11
|
+
<td>john.lennon</td>
|
12
|
+
<td>monkeys</td>
|
13
|
+
</tr>
|
14
|
+
<tr>
|
15
|
+
<td>ringo.starr</td>
|
16
|
+
<td>chucknorris</td>
|
17
|
+
</tr>
|
18
|
+
<tr>
|
19
|
+
<td>george.harrison</td>
|
20
|
+
<td>dishwasher</td>
|
21
|
+
</tr>
|
22
|
+
<tr>
|
23
|
+
<td>paul.mcartney</td>
|
24
|
+
<td>flamingweasel</td>
|
25
|
+
</tr>
|
26
|
+
</table>
|
27
|
+
|
28
|
+
<p>Searching for "<b concordion:set="#searchString">arr</b>" will return:</p>
|
29
|
+
|
30
|
+
<table concordion:verifyRows="#users = getSearchResultsFor(#searchString)">
|
31
|
+
<tr>
|
32
|
+
<th concordion:assertEquals="#user.name">Matching Usernames</th>
|
33
|
+
<th concordion:assertEquals="#user.other">and their Other field</th>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td>george.harrison</td>
|
37
|
+
<td>dishwasher</td>
|
38
|
+
</tr>
|
39
|
+
<tr>
|
40
|
+
<td>ringo.starr</td>
|
41
|
+
<td>chucknorris</td>
|
42
|
+
</tr>
|
43
|
+
</table>
|
44
|
+
</body>
|
45
|
+
</html>
|
46
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<p>Given these users:</p>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<tr>
|
7
|
+
<th concordion:execute="setupUser(#TEXT)">Username</th>
|
8
|
+
</tr>
|
9
|
+
<tr>
|
10
|
+
<td>ringo.starr</td>
|
11
|
+
</tr>
|
12
|
+
|
13
|
+
</table>
|
14
|
+
|
15
|
+
<p>Searching for "<b concordion:set="#searchString">arr</b>" will return:</p>
|
16
|
+
|
17
|
+
<table concordion:verifyRows="#users = getSearchResultsFor(#searchString)">
|
18
|
+
<tr>
|
19
|
+
<th concordion:assertEquals="#user.name">Matching Usernames</th>
|
20
|
+
</tr>
|
21
|
+
<tr>
|
22
|
+
<td>ringo.starr</td>
|
23
|
+
</tr>
|
24
|
+
</table>
|
25
|
+
</body>
|
26
|
+
</html>
|
27
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
require 'concordion_test_case'
|
3
|
+
require 'user'
|
4
|
+
class VerifyRowsScsrTest < ConcordionTestCase
|
5
|
+
def setup
|
6
|
+
@users = []
|
7
|
+
end
|
8
|
+
|
9
|
+
def setupUser(name)
|
10
|
+
@users << User.new(name,"whatever")
|
11
|
+
end
|
12
|
+
|
13
|
+
def getSearchResultsFor(query)
|
14
|
+
@users.select {|u| u.name.include?(query) }.sort{|x,y| x.name <=> y.name}
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
|
4
|
+
<table concordion:verifyRows="#users = getSearchResultsFor(#searchString)">
|
5
|
+
<tr>
|
6
|
+
<th concordion:assertEquals="#user.foo">and their Other field</th>
|
7
|
+
</tr>
|
8
|
+
<tr>
|
9
|
+
<td>bar</td>
|
10
|
+
</tr>
|
11
|
+
</table>
|
12
|
+
</body>
|
13
|
+
</html>
|
14
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'concordion_test_case'
|
3
|
+
|
4
|
+
class Thingit
|
5
|
+
attr_reader :foo
|
6
|
+
def initialize(foo)
|
7
|
+
@foo = foo
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class VerifyRowsSimpleTest < ConcordionTestCase
|
12
|
+
def getSearchResultsFor(query)
|
13
|
+
users = []
|
14
|
+
users << Thingit.new("bar")
|
15
|
+
users
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'concordion_test_case'
|
3
|
+
|
4
|
+
class VerifyRowsTest < ConcordionTestCase
|
5
|
+
def setup
|
6
|
+
@users = []
|
7
|
+
end
|
8
|
+
|
9
|
+
def setupUser(name, other)
|
10
|
+
@users << User.new(name,other)
|
11
|
+
end
|
12
|
+
|
13
|
+
def getSearchResultsFor(query)
|
14
|
+
@users.select {|u| u.name.include?(query) }.sort{|x,y| x.name <=> y.name}
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<p concordion:assertEquals="apostrophe()">Apostrophe's</p>
|
4
|
+
<p concordion:assertEquals="as_apostrophe_bs()">As ' Bs</p>
|
5
|
+
<p concordion:assertEquals="check(#TEXT)">A's</p>
|
6
|
+
</body>
|
7
|
+
</html>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<p>Given an <span concordion:execute="#author = setup_user (#TEXT)">author</span>
|
4
|
+
who has an
|
5
|
+
<span concordion:execute="#entity = setup_entity(#author,#TEXT)">entity</span>
|
6
|
+
with no versions,
|
7
|
+
</p>
|
8
|
+
<p concordion:execute="delete_users_entity(#author,#entity)"
|
9
|
+
>When the author deletes the entity,</p>
|
10
|
+
<p concordion:assertTrue="is_deleted?(#entity)">Then entity is
|
11
|
+
deleted from the system.</p>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'concordion_test_case'
|
3
|
+
require 'user'
|
4
|
+
|
5
|
+
class SomeEntity
|
6
|
+
attr_accessor :nombre, :deleted
|
7
|
+
def initialize(nombre)
|
8
|
+
@nombre = nombre
|
9
|
+
@deleted = false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class ArielExampleTest < ConcordionTestCase
|
14
|
+
|
15
|
+
def setup_user(name)
|
16
|
+
User.new(name, "whatever")
|
17
|
+
end
|
18
|
+
|
19
|
+
def setup_entity(user, entity_name)
|
20
|
+
entity = SomeEntity.new(entity_name)
|
21
|
+
user.other = entity
|
22
|
+
|
23
|
+
entity
|
24
|
+
end
|
25
|
+
|
26
|
+
def delete_users_entity(user, entity)
|
27
|
+
if user.other.nombre == entity.nombre
|
28
|
+
user.other.deleted = true
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def is_deleted?(entity)
|
33
|
+
entity.deleted
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# To change this template, choose Tools | Templates
|
2
|
+
# and open the template in the editor.
|
3
|
+
require 'concordion_test_case'
|
4
|
+
class BasicAssertTrueTest < ConcordionTestCase
|
5
|
+
def initialize(suite)
|
6
|
+
super(suite, {:expected_failure_count => 1})
|
7
|
+
end
|
8
|
+
def expected_failure_count
|
9
|
+
1
|
10
|
+
end
|
11
|
+
|
12
|
+
def is_boiling_point(temperature)
|
13
|
+
212 == temperature.to_i
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<p concordion:assertEquals="no_args">foo</p>
|
4
|
+
<p concordion:assertEquals="return_arg #TEXT">foo</p>
|
5
|
+
<p concordion:set="#bar">bar</p>
|
6
|
+
<p concordion:set="#baz">baz</p>
|
7
|
+
<p concordion:assertEquals="concat #bar, #baz">bar:baz</p>
|
8
|
+
<p concordion:execute="#result = concat #TEXT, #TEXT">AA</p>
|
9
|
+
<p concordion:assertEquals="#result">AA:AA</p>
|
10
|
+
<p concordion:execute="#result = concat #baz, #TEXT">zab</p>
|
11
|
+
<p concordion:assertEquals="#result">baz:zab</p>
|
12
|
+
<p concordion:execute="#result = concat #TEXT, #bar">fed</p>
|
13
|
+
<p concordion:assertEquals="#result">fed:bar</p>
|
14
|
+
</body>
|
15
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'concordion_test_case'
|
3
|
+
|
4
|
+
class NoParensTest < ConcordionTestCase
|
5
|
+
|
6
|
+
def no_args
|
7
|
+
"foo"
|
8
|
+
end
|
9
|
+
|
10
|
+
def return_arg(arg)
|
11
|
+
arg
|
12
|
+
end
|
13
|
+
|
14
|
+
def concat(a,b)
|
15
|
+
raise "second arg nil" if b.nil?
|
16
|
+
raise "first arg nil" if a.nil?
|
17
|
+
|
18
|
+
"#{a}:#{b}"
|
19
|
+
end
|
20
|
+
end
|