rcor 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/Rakefile.rb +39 -0
  2. data/lib/concordion.rb +66 -0
  3. data/lib/concordion_binder.rb +24 -0
  4. data/lib/concordion_constants.rb +13 -0
  5. data/lib/concordion_css.rb +172 -0
  6. data/lib/concordion_css_decorator.rb +52 -0
  7. data/lib/concordion_environment.rb +28 -0
  8. data/lib/concordion_instrumenter.rb +30 -0
  9. data/lib/concordion_invocation_string_builder.rb +24 -0
  10. data/lib/concordion_invoker.rb +33 -0
  11. data/lib/concordion_lookahead_handler.rb +17 -0
  12. data/lib/concordion_parse_result.rb +31 -0
  13. data/lib/concordion_parser.rb +47 -0
  14. data/lib/concordion_processor.rb +24 -0
  15. data/lib/concordion_reader.rb +18 -0
  16. data/lib/concordion_string_utility.rb +63 -0
  17. data/lib/concordion_string_writer.rb +13 -0
  18. data/lib/concordion_test_case.rb +97 -0
  19. data/lib/concordion_utility.rb +70 -0
  20. data/lib/concordion_verifier.rb +50 -0
  21. data/lib/concordion_writer.rb +43 -0
  22. data/lib/goldmaster_test_case.rb +32 -0
  23. data/lib/rcor.rb +2 -0
  24. data/nbproject/private/config.properties +0 -0
  25. data/nbproject/private/private.properties +4 -0
  26. data/nbproject/private/private.xml +10 -0
  27. data/nbproject/project.properties +11 -0
  28. data/nbproject/project.xml +16 -0
  29. data/test-lib/single_row_result.rb +9 -0
  30. data/test-lib/user.rb +8 -0
  31. data/tests/attr_assert.html +5 -0
  32. data/tests/attr_assert_test.rb +13 -0
  33. data/tests/basic_assert.html +5 -0
  34. data/tests/basic_assert_test.rb +9 -0
  35. data/tests/basic_assert_true.html +6 -0
  36. data/tests/basic_assert_true_test.rb +11 -0
  37. data/tests/basic_set.html +8 -0
  38. data/tests/basic_set_test.rb +8 -0
  39. data/tests/basic_text.html +6 -0
  40. data/tests/basic_text_test.rb +12 -0
  41. data/tests/concordion.css +2 -0
  42. data/tests/concordion_css_decorator_test.rb +28 -0
  43. data/tests/concordion_environment_test.rb +44 -0
  44. data/tests/concordion_parse_result_test.rb +33 -0
  45. data/tests/concordion_test.rb +49 -0
  46. data/tests/concordion_utility_test.rb +88 -0
  47. data/tests/concordion_verifier_test.rb +38 -0
  48. data/tests/concordion_writer_test.rb +26 -0
  49. data/tests/failing.html +5 -0
  50. data/tests/failing_test.rb +15 -0
  51. data/tests/goldmaster_failing.html +5 -0
  52. data/tests/goldmaster_failing_goldmaster.html +162 -0
  53. data/tests/goldmaster_failing_test.rb +11 -0
  54. data/tests/goldmaster_passing.html +5 -0
  55. data/tests/goldmaster_passing_goldmaster.html +162 -0
  56. data/tests/goldmaster_passing_test.rb +9 -0
  57. data/tests/goldmaster_table.html +46 -0
  58. data/tests/goldmaster_table_goldmaster.html +203 -0
  59. data/tests/goldmaster_table_test.rb +17 -0
  60. data/tests/lookahead_assert_true.html +25 -0
  61. data/tests/lookahead_assert_true_test.rb +17 -0
  62. data/tests/nested_element_lookahead.html +9 -0
  63. data/tests/nested_element_lookahead_test.rb +8 -0
  64. data/tests/processes_elements_in_sorted_order.html +12 -0
  65. data/tests/processes_elements_in_sorted_order_test.rb +13 -0
  66. data/tests/return_result.html +7 -0
  67. data/tests/return_result_test.rb +17 -0
  68. data/tests/single_row_table.html +13 -0
  69. data/tests/single_row_table_test.rb +9 -0
  70. data/tests/table.html +28 -0
  71. data/tests/table_test.rb +9 -0
  72. data/tests/test_helper.rb +9 -0
  73. data/tests/verify_rows.html +46 -0
  74. data/tests/verify_rows_scsr.html +27 -0
  75. data/tests/verify_rows_scsr_test.rb +15 -0
  76. data/tests/verify_rows_test.rb +16 -0
  77. metadata +142 -0
@@ -0,0 +1,9 @@
1
+ $: << File.join(File.expand_path(File.dirname( __FILE__)),"..","lib")
2
+ $: << File.join(File.expand_path(File.dirname( __FILE__)),"..","test-lib")
3
+ $: << File.expand_path(File.dirname( __FILE__))
4
+
5
+ require "test/unit"
6
+
7
+ class Test::Unit::TestCase
8
+
9
+ end
@@ -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,15 @@
1
+
2
+ class VerifyRowsScsrTest < ConcordionTestCase
3
+ def setup
4
+ @users = []
5
+ end
6
+
7
+ def setupUser(name)
8
+ @users << User.new(name,"whatever")
9
+ end
10
+
11
+ def getSearchResultsFor(query)
12
+ @users.select {|u| u.name.include?(query) }.sort{|x,y| x.name <=> y.name}
13
+ end
14
+
15
+ 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
metadata ADDED
@@ -0,0 +1,142 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rcor
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.1
5
+ platform: ruby
6
+ authors:
7
+ - Ben Goodspeed
8
+ autorequire: rake
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-12-28 00:00:00 -04:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hpricot
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0.6"
24
+ version:
25
+ description:
26
+ email: b.goodspeed@gmail.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files: []
32
+
33
+ files:
34
+ - test-lib
35
+ - test-lib/single_row_result.rb
36
+ - test-lib/user.rb
37
+ - Rakefile.rb
38
+ - tests
39
+ - tests/concordion_test.rb
40
+ - tests/concordion_utility_test.rb
41
+ - tests/basic_assert_true.html
42
+ - tests/goldmaster_passing_test.rb
43
+ - tests/goldmaster_passing.html
44
+ - tests/concordion_writer_test.rb
45
+ - tests/attr_assert.html
46
+ - tests/goldmaster_failing_test.rb
47
+ - tests/concordion.css
48
+ - tests/verify_rows.html
49
+ - tests/basic_assert.html
50
+ - tests/goldmaster_table_test.rb
51
+ - tests/goldmaster_failing.html
52
+ - tests/lookahead_assert_true_test.rb
53
+ - tests/failing.html
54
+ - tests/table.html
55
+ - tests/basic_set_test.rb
56
+ - tests/concordion_verifier_test.rb
57
+ - tests/lookahead_assert_true.html
58
+ - tests/basic_text.html
59
+ - tests/test_helper.rb
60
+ - tests/processes_elements_in_sorted_order_test.rb
61
+ - tests/verify_rows_scsr.html
62
+ - tests/return_result_test.rb
63
+ - tests/nested_element_lookahead.html
64
+ - tests/single_row_table.html
65
+ - tests/nested_element_lookahead_test.rb
66
+ - tests/basic_assert_true_test.rb
67
+ - tests/goldmaster_failing_goldmaster.html
68
+ - tests/basic_set.html
69
+ - tests/goldmaster_passing_goldmaster.html
70
+ - tests/failing_test.rb
71
+ - tests/return_result.html
72
+ - tests/verify_rows_scsr_test.rb
73
+ - tests/processes_elements_in_sorted_order.html
74
+ - tests/basic_text_test.rb
75
+ - tests/goldmaster_table_goldmaster.html
76
+ - tests/concordion_parse_result_test.rb
77
+ - tests/verify_rows_test.rb
78
+ - tests/concordion_css_decorator_test.rb
79
+ - tests/goldmaster_table.html
80
+ - tests/single_row_table_test.rb
81
+ - tests/table_test.rb
82
+ - tests/basic_assert_test.rb
83
+ - tests/concordion_environment_test.rb
84
+ - tests/attr_assert_test.rb
85
+ - lib
86
+ - lib/concordion.rb
87
+ - lib/rcor.rb
88
+ - lib/goldmaster_test_case.rb
89
+ - lib/concordion_invocation_string_builder.rb
90
+ - lib/concordion_parse_result.rb
91
+ - lib/concordion_processor.rb
92
+ - lib/concordion_string_writer.rb
93
+ - lib/concordion_instrumenter.rb
94
+ - lib/concordion_lookahead_handler.rb
95
+ - lib/concordion_invoker.rb
96
+ - lib/concordion_environment.rb
97
+ - lib/concordion_verifier.rb
98
+ - lib/concordion_parser.rb
99
+ - lib/concordion_reader.rb
100
+ - lib/concordion_binder.rb
101
+ - lib/concordion_css.rb
102
+ - lib/concordion_css_decorator.rb
103
+ - lib/concordion_writer.rb
104
+ - lib/concordion_constants.rb
105
+ - lib/concordion_utility.rb
106
+ - lib/concordion_test_case.rb
107
+ - lib/concordion_string_utility.rb
108
+ - nbproject
109
+ - nbproject/project.xml
110
+ - nbproject/project.properties
111
+ - nbproject/private
112
+ - nbproject/private/config.properties
113
+ - nbproject/private/private.properties
114
+ - nbproject/private/private.xml
115
+ has_rdoc: false
116
+ homepage:
117
+ post_install_message:
118
+ rdoc_options: []
119
+
120
+ require_paths:
121
+ - lib
122
+ required_ruby_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: "0"
127
+ version:
128
+ required_rubygems_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: "0"
133
+ version:
134
+ requirements:
135
+ - hpricot HTML parser
136
+ rubyforge_project:
137
+ rubygems_version: 1.2.0
138
+ signing_key:
139
+ specification_version: 2
140
+ summary: Ruby based concordion
141
+ test_files: []
142
+