rcor 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile.rb +39 -0
- data/lib/concordion.rb +66 -0
- data/lib/concordion_binder.rb +24 -0
- data/lib/concordion_constants.rb +13 -0
- data/lib/concordion_css.rb +172 -0
- data/lib/concordion_css_decorator.rb +52 -0
- data/lib/concordion_environment.rb +28 -0
- data/lib/concordion_instrumenter.rb +30 -0
- data/lib/concordion_invocation_string_builder.rb +24 -0
- data/lib/concordion_invoker.rb +33 -0
- data/lib/concordion_lookahead_handler.rb +17 -0
- data/lib/concordion_parse_result.rb +31 -0
- data/lib/concordion_parser.rb +47 -0
- data/lib/concordion_processor.rb +24 -0
- data/lib/concordion_reader.rb +18 -0
- data/lib/concordion_string_utility.rb +63 -0
- data/lib/concordion_string_writer.rb +13 -0
- data/lib/concordion_test_case.rb +97 -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 +32 -0
- data/lib/rcor.rb +2 -0
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +4 -0
- data/nbproject/private/private.xml +10 -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/attr_assert.html +5 -0
- data/tests/attr_assert_test.rb +13 -0
- data/tests/basic_assert.html +5 -0
- data/tests/basic_assert_test.rb +9 -0
- data/tests/basic_assert_true.html +6 -0
- data/tests/basic_assert_true_test.rb +11 -0
- data/tests/basic_set.html +8 -0
- data/tests/basic_set_test.rb +8 -0
- data/tests/basic_text.html +6 -0
- data/tests/basic_text_test.rb +12 -0
- data/tests/concordion.css +2 -0
- data/tests/concordion_css_decorator_test.rb +28 -0
- data/tests/concordion_environment_test.rb +44 -0
- data/tests/concordion_parse_result_test.rb +33 -0
- data/tests/concordion_test.rb +49 -0
- data/tests/concordion_utility_test.rb +88 -0
- data/tests/concordion_verifier_test.rb +38 -0
- data/tests/concordion_writer_test.rb +26 -0
- data/tests/failing.html +5 -0
- data/tests/failing_test.rb +15 -0
- data/tests/goldmaster_failing.html +5 -0
- data/tests/goldmaster_failing_goldmaster.html +162 -0
- data/tests/goldmaster_failing_test.rb +11 -0
- data/tests/goldmaster_passing.html +5 -0
- data/tests/goldmaster_passing_goldmaster.html +162 -0
- data/tests/goldmaster_passing_test.rb +9 -0
- data/tests/goldmaster_table.html +46 -0
- data/tests/goldmaster_table_goldmaster.html +203 -0
- data/tests/goldmaster_table_test.rb +17 -0
- data/tests/lookahead_assert_true.html +25 -0
- data/tests/lookahead_assert_true_test.rb +17 -0
- data/tests/nested_element_lookahead.html +9 -0
- data/tests/nested_element_lookahead_test.rb +8 -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/single_row_table.html +13 -0
- data/tests/single_row_table_test.rb +9 -0
- data/tests/table.html +28 -0
- data/tests/table_test.rb +9 -0
- data/tests/test_helper.rb +9 -0
- data/tests/verify_rows.html +46 -0
- data/tests/verify_rows_scsr.html +27 -0
- data/tests/verify_rows_scsr_test.rb +15 -0
- data/tests/verify_rows_test.rb +16 -0
- metadata +142 -0
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'concordion'
|
3
|
+
require 'concordion_verifier'
|
4
|
+
|
5
|
+
class ConcordionVerifierTest < Test::Unit::TestCase
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@concordion = Concordion.new
|
9
|
+
@verifier = ConcordionVerifier.new(@concordion)
|
10
|
+
end
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
def test_update_does_not_blow_up_if_verification_variable_unset
|
15
|
+
@verifier.verification_variable = nil
|
16
|
+
@verifier.update_verifier(1)
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_update_verification
|
20
|
+
assert @concordion.get_variable("#user").nil?
|
21
|
+
@concordion.set_variable("#users", ["A", "B", "C"])
|
22
|
+
@verifier.verification_variable = "#users"
|
23
|
+
@verifier.update_verifier(2) # will be one larger because of the header row
|
24
|
+
|
25
|
+
assert_equal "B", @concordion.get_variable("#user")
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
def test_update_verification_automatically_sets_to_zero
|
30
|
+
assert @concordion.get_variable("#user").nil?
|
31
|
+
@concordion.set_variable("#users", ["A", "B", "C"])
|
32
|
+
@verifier.verification_variable = "#users"
|
33
|
+
|
34
|
+
assert_equal "A", @concordion.get_variable("#user")
|
35
|
+
end
|
36
|
+
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'rubygems'
|
3
|
+
require 'mocha'
|
4
|
+
|
5
|
+
class ConcordionWriterTest < Test::Unit::TestCase
|
6
|
+
def test_output_file_name
|
7
|
+
|
8
|
+
assert_equal "./bleh_test_output.html",
|
9
|
+
ConcordionWriter.new.output_filename_for("bleh.html")
|
10
|
+
assert_equal "./bleh_test_output.html",
|
11
|
+
ConcordionWriter.new(nil).output_filename_for("bleh.html")
|
12
|
+
assert_equal "foo/bleh_test_output.html",
|
13
|
+
ConcordionWriter.new("foo").output_filename_for("bleh.html")
|
14
|
+
|
15
|
+
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_output_file_exists
|
19
|
+
File.expects(:exists?).with("foo/output.css").returns(true)
|
20
|
+
File.expects(:exists?).with("foo/missing").returns(false)
|
21
|
+
|
22
|
+
assert ConcordionWriter.new("foo").output_file_exists?("output.css")
|
23
|
+
assert !ConcordionWriter.new("foo").output_file_exists?("missing")
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
data/tests/failing.html
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion"><head><style type="text/css">* {
|
2
|
+
font-family: Arial;
|
3
|
+
}
|
4
|
+
body {
|
5
|
+
padding: 32px;
|
6
|
+
}
|
7
|
+
pre {
|
8
|
+
padding: 6px 28px 6px 28px;
|
9
|
+
background-color: #E8EEF7;
|
10
|
+
}
|
11
|
+
pre, pre *, code, kbd {
|
12
|
+
font-family: Courier New, Courier;
|
13
|
+
font-size: 10pt;
|
14
|
+
}
|
15
|
+
h1, h1 * {
|
16
|
+
font-size: 24pt;
|
17
|
+
}
|
18
|
+
p, td, th, li, .breadcrumbs {
|
19
|
+
font-size: 10pt;
|
20
|
+
}
|
21
|
+
p, li {
|
22
|
+
line-height: 140%;
|
23
|
+
}
|
24
|
+
table {
|
25
|
+
border-collapse: collapse;
|
26
|
+
empty-cells: show;
|
27
|
+
margin: 8px 0px 8px 0px;
|
28
|
+
}
|
29
|
+
th, td {
|
30
|
+
border: 1px solid black;
|
31
|
+
padding: 3px;
|
32
|
+
}
|
33
|
+
td {
|
34
|
+
background-color: white;
|
35
|
+
vertical-align: top;
|
36
|
+
}
|
37
|
+
th {
|
38
|
+
background-color: #C3D9FF;
|
39
|
+
}
|
40
|
+
li {
|
41
|
+
margin-top: 6px;
|
42
|
+
margin-bottom: 6px;
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
.example {
|
47
|
+
padding: 2px 12px 6px 12px;
|
48
|
+
border: 1px solid #C3D9FF;
|
49
|
+
margin: 6px 0px 28px 0px;
|
50
|
+
background-color: #F5F9FD;
|
51
|
+
}
|
52
|
+
.example h3 {
|
53
|
+
margin-top: 8px;
|
54
|
+
margin-bottom: 8px;
|
55
|
+
font-size: 12pt;
|
56
|
+
}
|
57
|
+
|
58
|
+
p.success {
|
59
|
+
padding: 2px;
|
60
|
+
}
|
61
|
+
.concordion_success, .concordion_success * {
|
62
|
+
background-color: #afa !important;
|
63
|
+
}
|
64
|
+
.success pre {
|
65
|
+
background-color: #bbffbb;
|
66
|
+
}
|
67
|
+
.concordion_failure, .concordion_failure * {
|
68
|
+
background-color: #ffb0b0;
|
69
|
+
padding: 1px;
|
70
|
+
}
|
71
|
+
.concordion_failure .expected {
|
72
|
+
text-decoration: line-through;
|
73
|
+
color: #bb5050;
|
74
|
+
}
|
75
|
+
|
76
|
+
ins {
|
77
|
+
text-decoration: none;
|
78
|
+
}
|
79
|
+
|
80
|
+
.exceptionMessage {
|
81
|
+
background-color: #fdd;
|
82
|
+
font-family: Courier New, Courier, Monospace;
|
83
|
+
font-size: 10pt;
|
84
|
+
display: block;
|
85
|
+
font-weight: normal;
|
86
|
+
padding: 4px;
|
87
|
+
text-decoration: none !important;
|
88
|
+
}
|
89
|
+
.stackTrace, .stackTrace * {
|
90
|
+
font-weight: normal;
|
91
|
+
}
|
92
|
+
.stackTrace {
|
93
|
+
display: none;
|
94
|
+
padding: 1px 4px 4px 4px;
|
95
|
+
background-color: #fdd;
|
96
|
+
border-top: 1px dotted black;
|
97
|
+
}
|
98
|
+
.stackTraceExceptionMessage {
|
99
|
+
display: block;
|
100
|
+
font-family: Courier New, Courier, Monospace;
|
101
|
+
font-size: 8pt;
|
102
|
+
white-space: wrap;
|
103
|
+
padding: 1px 0px 1px 0px;
|
104
|
+
}
|
105
|
+
.stackTraceEntry {
|
106
|
+
white-space: nowrap;
|
107
|
+
font-family: Courier New, Courier, Monospace;
|
108
|
+
display: block;
|
109
|
+
font-size: 8pt;
|
110
|
+
padding: 1px 0px 1px 32px;
|
111
|
+
}
|
112
|
+
.stackTraceButton {
|
113
|
+
font-size: 8pt;
|
114
|
+
margin: 2px 8px 2px 0px;
|
115
|
+
font-weight: normal;
|
116
|
+
font-family: Arial;
|
117
|
+
}
|
118
|
+
|
119
|
+
.special {
|
120
|
+
font-style: italic;
|
121
|
+
}
|
122
|
+
.missing, .missing * {
|
123
|
+
background-color: #ff9999;
|
124
|
+
}
|
125
|
+
.surplus, .surplus * {
|
126
|
+
background-color: #ff9999;
|
127
|
+
}
|
128
|
+
.footer {
|
129
|
+
text-align: right;
|
130
|
+
margin-top: 40px;
|
131
|
+
font-size: 8pt;
|
132
|
+
width: 100%;
|
133
|
+
color: #999;
|
134
|
+
}
|
135
|
+
.footer .testTime {
|
136
|
+
padding: 2px 10px 0px 0px;
|
137
|
+
}
|
138
|
+
|
139
|
+
.idea {
|
140
|
+
font-size: 9pt;
|
141
|
+
color: #888;
|
142
|
+
font-style: italic;
|
143
|
+
}
|
144
|
+
.tight li {
|
145
|
+
margin-top: 1px;
|
146
|
+
margin-bottom: 1px;
|
147
|
+
}
|
148
|
+
.commentary {
|
149
|
+
float: right;
|
150
|
+
width: 200px;
|
151
|
+
background-color: #ffffd0;
|
152
|
+
padding:8px;
|
153
|
+
border: 3px solid #eeeeb0;
|
154
|
+
margin: 10px 0px 10px 10px;
|
155
|
+
}
|
156
|
+
.commentary, .commentary * {
|
157
|
+
font-size: 8pt;
|
158
|
+
}</style></head>
|
159
|
+
<body>
|
160
|
+
<p concordion:assertequals="getGreeting()" class="concordion_failure">Hello World! expected but received Hello World?</p>
|
161
|
+
</body>
|
162
|
+
</html>
|
@@ -0,0 +1,162 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion"><head><style type="text/css">* {
|
2
|
+
font-family: Arial;
|
3
|
+
}
|
4
|
+
body {
|
5
|
+
padding: 32px;
|
6
|
+
}
|
7
|
+
pre {
|
8
|
+
padding: 6px 28px 6px 28px;
|
9
|
+
background-color: #E8EEF7;
|
10
|
+
}
|
11
|
+
pre, pre *, code, kbd {
|
12
|
+
font-family: Courier New, Courier;
|
13
|
+
font-size: 10pt;
|
14
|
+
}
|
15
|
+
h1, h1 * {
|
16
|
+
font-size: 24pt;
|
17
|
+
}
|
18
|
+
p, td, th, li, .breadcrumbs {
|
19
|
+
font-size: 10pt;
|
20
|
+
}
|
21
|
+
p, li {
|
22
|
+
line-height: 140%;
|
23
|
+
}
|
24
|
+
table {
|
25
|
+
border-collapse: collapse;
|
26
|
+
empty-cells: show;
|
27
|
+
margin: 8px 0px 8px 0px;
|
28
|
+
}
|
29
|
+
th, td {
|
30
|
+
border: 1px solid black;
|
31
|
+
padding: 3px;
|
32
|
+
}
|
33
|
+
td {
|
34
|
+
background-color: white;
|
35
|
+
vertical-align: top;
|
36
|
+
}
|
37
|
+
th {
|
38
|
+
background-color: #C3D9FF;
|
39
|
+
}
|
40
|
+
li {
|
41
|
+
margin-top: 6px;
|
42
|
+
margin-bottom: 6px;
|
43
|
+
}
|
44
|
+
|
45
|
+
|
46
|
+
.example {
|
47
|
+
padding: 2px 12px 6px 12px;
|
48
|
+
border: 1px solid #C3D9FF;
|
49
|
+
margin: 6px 0px 28px 0px;
|
50
|
+
background-color: #F5F9FD;
|
51
|
+
}
|
52
|
+
.example h3 {
|
53
|
+
margin-top: 8px;
|
54
|
+
margin-bottom: 8px;
|
55
|
+
font-size: 12pt;
|
56
|
+
}
|
57
|
+
|
58
|
+
p.success {
|
59
|
+
padding: 2px;
|
60
|
+
}
|
61
|
+
.concordion_success, .concordion_success * {
|
62
|
+
background-color: #afa !important;
|
63
|
+
}
|
64
|
+
.success pre {
|
65
|
+
background-color: #bbffbb;
|
66
|
+
}
|
67
|
+
.concordion_failure, .concordion_failure * {
|
68
|
+
background-color: #ffb0b0;
|
69
|
+
padding: 1px;
|
70
|
+
}
|
71
|
+
.concordion_failure .expected {
|
72
|
+
text-decoration: line-through;
|
73
|
+
color: #bb5050;
|
74
|
+
}
|
75
|
+
|
76
|
+
ins {
|
77
|
+
text-decoration: none;
|
78
|
+
}
|
79
|
+
|
80
|
+
.exceptionMessage {
|
81
|
+
background-color: #fdd;
|
82
|
+
font-family: Courier New, Courier, Monospace;
|
83
|
+
font-size: 10pt;
|
84
|
+
display: block;
|
85
|
+
font-weight: normal;
|
86
|
+
padding: 4px;
|
87
|
+
text-decoration: none !important;
|
88
|
+
}
|
89
|
+
.stackTrace, .stackTrace * {
|
90
|
+
font-weight: normal;
|
91
|
+
}
|
92
|
+
.stackTrace {
|
93
|
+
display: none;
|
94
|
+
padding: 1px 4px 4px 4px;
|
95
|
+
background-color: #fdd;
|
96
|
+
border-top: 1px dotted black;
|
97
|
+
}
|
98
|
+
.stackTraceExceptionMessage {
|
99
|
+
display: block;
|
100
|
+
font-family: Courier New, Courier, Monospace;
|
101
|
+
font-size: 8pt;
|
102
|
+
white-space: wrap;
|
103
|
+
padding: 1px 0px 1px 0px;
|
104
|
+
}
|
105
|
+
.stackTraceEntry {
|
106
|
+
white-space: nowrap;
|
107
|
+
font-family: Courier New, Courier, Monospace;
|
108
|
+
display: block;
|
109
|
+
font-size: 8pt;
|
110
|
+
padding: 1px 0px 1px 32px;
|
111
|
+
}
|
112
|
+
.stackTraceButton {
|
113
|
+
font-size: 8pt;
|
114
|
+
margin: 2px 8px 2px 0px;
|
115
|
+
font-weight: normal;
|
116
|
+
font-family: Arial;
|
117
|
+
}
|
118
|
+
|
119
|
+
.special {
|
120
|
+
font-style: italic;
|
121
|
+
}
|
122
|
+
.missing, .missing * {
|
123
|
+
background-color: #ff9999;
|
124
|
+
}
|
125
|
+
.surplus, .surplus * {
|
126
|
+
background-color: #ff9999;
|
127
|
+
}
|
128
|
+
.footer {
|
129
|
+
text-align: right;
|
130
|
+
margin-top: 40px;
|
131
|
+
font-size: 8pt;
|
132
|
+
width: 100%;
|
133
|
+
color: #999;
|
134
|
+
}
|
135
|
+
.footer .testTime {
|
136
|
+
padding: 2px 10px 0px 0px;
|
137
|
+
}
|
138
|
+
|
139
|
+
.idea {
|
140
|
+
font-size: 9pt;
|
141
|
+
color: #888;
|
142
|
+
font-style: italic;
|
143
|
+
}
|
144
|
+
.tight li {
|
145
|
+
margin-top: 1px;
|
146
|
+
margin-bottom: 1px;
|
147
|
+
}
|
148
|
+
.commentary {
|
149
|
+
float: right;
|
150
|
+
width: 200px;
|
151
|
+
background-color: #ffffd0;
|
152
|
+
padding:8px;
|
153
|
+
border: 3px solid #eeeeb0;
|
154
|
+
margin: 10px 0px 10px 10px;
|
155
|
+
}
|
156
|
+
.commentary, .commentary * {
|
157
|
+
font-size: 8pt;
|
158
|
+
}</style></head>
|
159
|
+
<body>
|
160
|
+
<p concordion:assertequals="getGreeting()" class="concordion_success">Hello World!</p>
|
161
|
+
</body>
|
162
|
+
</html>
|