rcor 0.8.1 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile.rb +1 -1
- data/lib/concordion.rb +1 -8
- data/lib/concordion_constants.rb +1 -1
- data/lib/concordion_css.rb +8 -1
- data/lib/concordion_css_decorator.rb +21 -4
- data/lib/concordion_error_condition.rb +26 -0
- data/lib/concordion_invoker.rb +103 -9
- data/lib/concordion_parse_result.rb +19 -1
- data/lib/concordion_parser.rb +1 -1
- data/lib/concordion_processor.rb +3 -2
- data/lib/concordion_string_utility.rb +36 -2
- data/lib/concordion_test_case.rb +12 -62
- data/lib/concordion_test_methods.rb +127 -0
- data/lib/concordion_utility.rb +15 -3
- data/lib/goldmaster_test_case.rb +22 -5
- data/lib/loader_helper.rb +16 -0
- data/nbproject/private/private.xml +0 -6
- data/nbproject/private/rake-d.txt +13 -0
- data/tests/apostrophe.html +7 -0
- data/tests/apostrophe_test.rb +18 -0
- data/tests/ariel_example.html +13 -0
- data/tests/ariel_example_test.rb +36 -0
- data/tests/attr_assert.html +2 -0
- data/tests/basic_assert_true_test.rb +5 -1
- data/tests/basic_set.html +3 -0
- data/tests/basic_text.html +8 -0
- data/tests/basic_text_test.rb +11 -0
- data/tests/concordion_parse_result_test.rb +16 -1
- data/tests/concordion_test.rb +0 -14
- data/tests/concordion_utility_test.rb +44 -0
- data/tests/failing.html +4 -0
- data/tests/failing_test.rb +10 -2
- data/tests/goldmaster_assert_true_failing.html +5 -0
- data/tests/goldmaster_assert_true_failing_goldmaster.html +169 -0
- data/tests/goldmaster_assert_true_failing_test.rb +14 -0
- data/tests/goldmaster_failing.html +40 -0
- data/tests/goldmaster_failing_goldmaster.html +48 -1
- data/tests/goldmaster_failing_test.rb +28 -2
- data/tests/goldmaster_malformed.html +7 -0
- data/tests/goldmaster_malformed_goldmaster.html +171 -0
- data/tests/goldmaster_malformed_test.rb +11 -0
- data/tests/goldmaster_passing_goldmaster.html +8 -1
- data/tests/goldmaster_table_bug.html +12 -0
- data/tests/goldmaster_table_bug_goldmaster.html +176 -0
- data/tests/goldmaster_table_bug_test.rb +24 -0
- data/tests/goldmaster_table_goldmaster.html +8 -1
- data/tests/image.html +5 -0
- data/tests/image.jpg +0 -0
- data/tests/image_test.rb +9 -0
- data/tests/mixed.html +5 -0
- data/tests/mixed_test.rb +19 -0
- data/tests/no_parens.html +15 -0
- data/tests/no_parens_test.rb +20 -0
- data/tests/numbers.html +5 -0
- data/tests/numbers_test.rb +11 -0
- data/tests/verify_rows_scsr_test.rb +2 -0
- data/tests/verify_rows_simple.html +14 -0
- data/tests/verify_rows_simple_test.rb +17 -0
- metadata +31 -4
- data/lib/concordion_invocation_string_builder.rb +0 -24
@@ -0,0 +1,7 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<p concordio:thisIsFineAnythingCanBeHere=>asd'"'"{](}[)f</p>
|
4
|
+
<p concordion:badCommandIDontExist="foo()">this is not a real assertion so i dont match the output of foo</p>
|
5
|
+
<p concordion:assertEquals=42">i'm bad news tho</p>
|
6
|
+
</body>
|
7
|
+
</html>
|
@@ -0,0 +1,171 @@
|
|
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;
|
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
|
+
td.concordion_failure {
|
77
|
+
background-color: #ffb0b0 !important;
|
78
|
+
}
|
79
|
+
td.concordion_success {
|
80
|
+
background-color: #afa !important;
|
81
|
+
}
|
82
|
+
|
83
|
+
ins {
|
84
|
+
text-decoration: none;
|
85
|
+
}
|
86
|
+
|
87
|
+
.exceptionMessage {
|
88
|
+
background-color: #fdd;
|
89
|
+
font-family: Courier New, Courier, Monospace;
|
90
|
+
font-size: 10pt;
|
91
|
+
display: block;
|
92
|
+
font-weight: normal;
|
93
|
+
padding: 4px;
|
94
|
+
text-decoration: none !important;
|
95
|
+
}
|
96
|
+
.stackTrace, .stackTrace * {
|
97
|
+
font-weight: normal;
|
98
|
+
}
|
99
|
+
.stackTrace {
|
100
|
+
display: none;
|
101
|
+
padding: 1px 4px 4px 4px;
|
102
|
+
background-color: #fdd;
|
103
|
+
border-top: 1px dotted black;
|
104
|
+
}
|
105
|
+
.stackTraceExceptionMessage {
|
106
|
+
display: block;
|
107
|
+
font-family: Courier New, Courier, Monospace;
|
108
|
+
font-size: 8pt;
|
109
|
+
white-space: wrap;
|
110
|
+
padding: 1px 0px 1px 0px;
|
111
|
+
}
|
112
|
+
.stackTraceEntry {
|
113
|
+
white-space: nowrap;
|
114
|
+
font-family: Courier New, Courier, Monospace;
|
115
|
+
display: block;
|
116
|
+
font-size: 8pt;
|
117
|
+
padding: 1px 0px 1px 32px;
|
118
|
+
}
|
119
|
+
.stackTraceButton {
|
120
|
+
font-size: 8pt;
|
121
|
+
margin: 2px 8px 2px 0px;
|
122
|
+
font-weight: normal;
|
123
|
+
font-family: Arial;
|
124
|
+
}
|
125
|
+
|
126
|
+
.special {
|
127
|
+
font-style: italic;
|
128
|
+
}
|
129
|
+
.missing, .missing * {
|
130
|
+
background-color: #ff9999;
|
131
|
+
}
|
132
|
+
.surplus, .surplus * {
|
133
|
+
background-color: #ff9999;
|
134
|
+
}
|
135
|
+
.footer {
|
136
|
+
text-align: right;
|
137
|
+
margin-top: 40px;
|
138
|
+
font-size: 8pt;
|
139
|
+
width: 100%;
|
140
|
+
color: #999;
|
141
|
+
}
|
142
|
+
.footer .testTime {
|
143
|
+
padding: 2px 10px 0px 0px;
|
144
|
+
}
|
145
|
+
|
146
|
+
.idea {
|
147
|
+
font-size: 9pt;
|
148
|
+
color: #888;
|
149
|
+
font-style: italic;
|
150
|
+
}
|
151
|
+
.tight li {
|
152
|
+
margin-top: 1px;
|
153
|
+
margin-bottom: 1px;
|
154
|
+
}
|
155
|
+
.commentary {
|
156
|
+
float: right;
|
157
|
+
width: 200px;
|
158
|
+
background-color: #ffffd0;
|
159
|
+
padding:8px;
|
160
|
+
border: 3px solid #eeeeb0;
|
161
|
+
margin: 10px 0px 10px 10px;
|
162
|
+
}
|
163
|
+
.commentary, .commentary * {
|
164
|
+
font-size: 8pt;
|
165
|
+
}</style></head>
|
166
|
+
<body>
|
167
|
+
<p concordio:thisisfineanythingcanbehere>asd'"'"{](}[)f</p>
|
168
|
+
<p concordion:badcommandidontexist="foo()">this is not a real assertion so i dont match the output of foo</p>
|
169
|
+
<p concordion:assertequals="42" class="concordion_failure">i'm bad news tho expected but received [Missing method '42' in fixture GoldmasterMalformedTest ]</p>
|
170
|
+
</body>
|
171
|
+
</html>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'concordion_test_case'
|
3
|
+
require 'goldmaster_test_case'
|
4
|
+
|
5
|
+
class GoldmasterMalformedTest < GoldmasterTestCase
|
6
|
+
|
7
|
+
def expected_failure_count
|
8
|
+
1 #Note that the other two seeming commands do not fail- they are not actually run
|
9
|
+
end
|
10
|
+
|
11
|
+
end
|
@@ -59,7 +59,7 @@ p.success {
|
|
59
59
|
padding: 2px;
|
60
60
|
}
|
61
61
|
.concordion_success, .concordion_success * {
|
62
|
-
background-color: #afa
|
62
|
+
background-color: #afa;
|
63
63
|
}
|
64
64
|
.success pre {
|
65
65
|
background-color: #bbffbb;
|
@@ -73,6 +73,13 @@ p.success {
|
|
73
73
|
color: #bb5050;
|
74
74
|
}
|
75
75
|
|
76
|
+
td.concordion_failure {
|
77
|
+
background-color: #ffb0b0 !important;
|
78
|
+
}
|
79
|
+
td.concordion_success {
|
80
|
+
background-color: #afa !important;
|
81
|
+
}
|
82
|
+
|
76
83
|
ins {
|
77
84
|
text-decoration: none;
|
78
85
|
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<html xmlns:concordion="http://www.concordion.org/2007/concordion">
|
2
|
+
<body>
|
3
|
+
<table concordion:verifyRows="#plans = get_plans()">
|
4
|
+
<tr>
|
5
|
+
<th concordion:assertEquals="#plan.planName">Plan Name</th>
|
6
|
+
</tr>
|
7
|
+
<tr>
|
8
|
+
<td>Cunning Plan BUG</td>
|
9
|
+
</tr>
|
10
|
+
</table>
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -0,0 +1,176 @@
|
|
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;
|
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
|
+
td.concordion_failure {
|
77
|
+
background-color: #ffb0b0 !important;
|
78
|
+
}
|
79
|
+
td.concordion_success {
|
80
|
+
background-color: #afa !important;
|
81
|
+
}
|
82
|
+
|
83
|
+
ins {
|
84
|
+
text-decoration: none;
|
85
|
+
}
|
86
|
+
|
87
|
+
.exceptionMessage {
|
88
|
+
background-color: #fdd;
|
89
|
+
font-family: Courier New, Courier, Monospace;
|
90
|
+
font-size: 10pt;
|
91
|
+
display: block;
|
92
|
+
font-weight: normal;
|
93
|
+
padding: 4px;
|
94
|
+
text-decoration: none !important;
|
95
|
+
}
|
96
|
+
.stackTrace, .stackTrace * {
|
97
|
+
font-weight: normal;
|
98
|
+
}
|
99
|
+
.stackTrace {
|
100
|
+
display: none;
|
101
|
+
padding: 1px 4px 4px 4px;
|
102
|
+
background-color: #fdd;
|
103
|
+
border-top: 1px dotted black;
|
104
|
+
}
|
105
|
+
.stackTraceExceptionMessage {
|
106
|
+
display: block;
|
107
|
+
font-family: Courier New, Courier, Monospace;
|
108
|
+
font-size: 8pt;
|
109
|
+
white-space: wrap;
|
110
|
+
padding: 1px 0px 1px 0px;
|
111
|
+
}
|
112
|
+
.stackTraceEntry {
|
113
|
+
white-space: nowrap;
|
114
|
+
font-family: Courier New, Courier, Monospace;
|
115
|
+
display: block;
|
116
|
+
font-size: 8pt;
|
117
|
+
padding: 1px 0px 1px 32px;
|
118
|
+
}
|
119
|
+
.stackTraceButton {
|
120
|
+
font-size: 8pt;
|
121
|
+
margin: 2px 8px 2px 0px;
|
122
|
+
font-weight: normal;
|
123
|
+
font-family: Arial;
|
124
|
+
}
|
125
|
+
|
126
|
+
.special {
|
127
|
+
font-style: italic;
|
128
|
+
}
|
129
|
+
.missing, .missing * {
|
130
|
+
background-color: #ff9999;
|
131
|
+
}
|
132
|
+
.surplus, .surplus * {
|
133
|
+
background-color: #ff9999;
|
134
|
+
}
|
135
|
+
.footer {
|
136
|
+
text-align: right;
|
137
|
+
margin-top: 40px;
|
138
|
+
font-size: 8pt;
|
139
|
+
width: 100%;
|
140
|
+
color: #999;
|
141
|
+
}
|
142
|
+
.footer .testTime {
|
143
|
+
padding: 2px 10px 0px 0px;
|
144
|
+
}
|
145
|
+
|
146
|
+
.idea {
|
147
|
+
font-size: 9pt;
|
148
|
+
color: #888;
|
149
|
+
font-style: italic;
|
150
|
+
}
|
151
|
+
.tight li {
|
152
|
+
margin-top: 1px;
|
153
|
+
margin-bottom: 1px;
|
154
|
+
}
|
155
|
+
.commentary {
|
156
|
+
float: right;
|
157
|
+
width: 200px;
|
158
|
+
background-color: #ffffd0;
|
159
|
+
padding:8px;
|
160
|
+
border: 3px solid #eeeeb0;
|
161
|
+
margin: 10px 0px 10px 10px;
|
162
|
+
}
|
163
|
+
.commentary, .commentary * {
|
164
|
+
font-size: 8pt;
|
165
|
+
}</style></head>
|
166
|
+
<body>
|
167
|
+
<table class="concordion_failure" concordion:verifyrows="#plans = get_plans()">
|
168
|
+
<tr>
|
169
|
+
<th concordion:assertequals="#plan.planName">Plan Name</th>
|
170
|
+
</tr>
|
171
|
+
<tr>
|
172
|
+
<td concordion:assertequals="#plan.planName">Cunning Plan BUG</td>
|
173
|
+
</tr>
|
174
|
+
<tr><td concordion:assertequals="#plan.planName">[1 Surplus Row(s) Returned By Fixture]</td></tr></table>
|
175
|
+
</body>
|
176
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'goldmaster_test_case'
|
3
|
+
|
4
|
+
require 'mocha'
|
5
|
+
|
6
|
+
class GoldmasterTableBugTest < GoldmasterTestCase
|
7
|
+
def expected_failure_count
|
8
|
+
1
|
9
|
+
end
|
10
|
+
|
11
|
+
def get_plans
|
12
|
+
plans = []
|
13
|
+
plans << mock_plan_named("Cunning Plan BUG")
|
14
|
+
plans << mock_plan_named("Cunning Plan DEFECT")
|
15
|
+
plans
|
16
|
+
end
|
17
|
+
|
18
|
+
def mock_plan_named(name)
|
19
|
+
plan = mock("plan")
|
20
|
+
plan.stubs(:planName).returns name
|
21
|
+
plan
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
@@ -59,7 +59,7 @@ p.success {
|
|
59
59
|
padding: 2px;
|
60
60
|
}
|
61
61
|
.concordion_success, .concordion_success * {
|
62
|
-
background-color: #afa
|
62
|
+
background-color: #afa;
|
63
63
|
}
|
64
64
|
.success pre {
|
65
65
|
background-color: #bbffbb;
|
@@ -73,6 +73,13 @@ p.success {
|
|
73
73
|
color: #bb5050;
|
74
74
|
}
|
75
75
|
|
76
|
+
td.concordion_failure {
|
77
|
+
background-color: #ffb0b0 !important;
|
78
|
+
}
|
79
|
+
td.concordion_success {
|
80
|
+
background-color: #afa !important;
|
81
|
+
}
|
82
|
+
|
76
83
|
ins {
|
77
84
|
text-decoration: none;
|
78
85
|
}
|