asciidoctor-iso 0.9.9 → 0.10.0

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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +7 -0
  3. data/README.adoc +49 -9
  4. data/asciidoctor-iso.gemspec +3 -3
  5. data/lib/asciidoctor-iso.rb +2 -0
  6. data/lib/asciidoctor/iso/base.rb +14 -0
  7. data/lib/asciidoctor/iso/blocks.rb +1 -1
  8. data/lib/asciidoctor/iso/cleanup.rb +2 -2
  9. data/lib/asciidoctor/iso/cleanup_ref.rb +1 -1
  10. data/lib/asciidoctor/iso/inline.rb +1 -1
  11. data/lib/asciidoctor/iso/macros.rb +54 -0
  12. data/lib/asciidoctor/iso/ref.rb +7 -2
  13. data/lib/asciidoctor/iso/validate.rb +8 -8
  14. data/lib/asciidoctor/iso/validate_requirements.rb +5 -5
  15. data/lib/asciidoctor/iso/version.rb +1 -1
  16. data/lib/isodoc/iso/html/header.html +206 -0
  17. data/lib/isodoc/iso/html/html_iso_intro.html +34 -0
  18. data/lib/isodoc/iso/html/html_iso_titlepage.html +34 -0
  19. data/lib/isodoc/iso/html/htmlstyle.scss +46 -0
  20. data/lib/isodoc/iso/html/isodoc.scss +696 -0
  21. data/lib/isodoc/iso/html/scripts.html +174 -0
  22. data/lib/isodoc/iso/html/style-human.scss +1277 -0
  23. data/lib/isodoc/iso/html/style-iso.scss +1257 -0
  24. data/lib/isodoc/iso/html/word_iso_intro.html +72 -0
  25. data/lib/isodoc/iso/html/word_iso_titlepage.html +62 -0
  26. data/lib/isodoc/iso/html/wordstyle.scss +1175 -0
  27. data/lib/isodoc/iso/html_convert.rb +136 -0
  28. data/lib/isodoc/iso/metadata.rb +107 -0
  29. data/lib/isodoc/iso/word_convert.rb +139 -0
  30. data/spec/asciidoctor-iso/isobib_cache_spec.rb +18 -4
  31. data/spec/asciidoctor-iso/macros_spec.rb +92 -1
  32. data/spec/asciidoctor-iso/validate_spec.rb +173 -144
  33. data/spec/assets/header.html +7 -0
  34. data/spec/assets/html.css +2 -0
  35. data/spec/assets/htmlcover.html +4 -0
  36. data/spec/assets/htmlintro.html +5 -0
  37. data/spec/assets/i18n.yaml +2 -0
  38. data/spec/assets/iso.doc +2312 -0
  39. data/spec/assets/iso.headless.html +33 -0
  40. data/spec/assets/iso.html +1388 -0
  41. data/spec/assets/iso.xml +8 -0
  42. data/spec/assets/rice_image1.png +0 -0
  43. data/spec/assets/scripts.html +3 -0
  44. data/spec/assets/std.css +2 -0
  45. data/spec/assets/word.css +2 -0
  46. data/spec/assets/wordcover.html +3 -0
  47. data/spec/assets/wordintro.html +4 -0
  48. data/spec/examples/103_01_02.html +247 -0
  49. data/spec/isodoc/i18n_spec.rb +642 -0
  50. data/spec/isodoc/iso_spec.rb +168 -0
  51. data/spec/isodoc/metadata_spec.rb +152 -0
  52. data/spec/isodoc/postproc_spec.rb +409 -0
  53. data/spec/isodoc/section_spec.rb +522 -0
  54. data/spec/isodoc/xref_spec.rb +1337 -0
  55. data/spec/spec_helper.rb +45 -0
  56. metadata +45 -9
@@ -1,7 +1,7 @@
1
1
  require "spec_helper"
2
2
 
3
3
  RSpec.describe Asciidoctor::ISO do
4
- it "processes the Asciidoctor::ISO macros" do
4
+ it "processes the Asciidoctor::ISO inline macros" do
5
5
  expect(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true)).to be_equivalent_to <<~"OUTPUT"
6
6
  #{ASCIIDOC_BLANK_HDR}
7
7
  alt:[term1]
@@ -17,4 +17,95 @@ RSpec.describe Asciidoctor::ISO do
17
17
  </iso-standard>
18
18
  OUTPUT
19
19
  end
20
+
21
+ it "processes the PlantUML macro" do
22
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
23
+ #{ASCIIDOC_BLANK_HDR}
24
+
25
+ [plantuml]
26
+ ....
27
+ @startuml
28
+ Alice -> Bob: Authentication Request
29
+ Bob --> Alice: Authentication Response
30
+
31
+ Alice -> Bob: Another authentication Request
32
+ Alice <-- Bob: another authentication Response
33
+ @enduml
34
+ ....
35
+
36
+ [plantuml]
37
+ ....
38
+ Alice -> Bob: Authentication Request
39
+ Bob --> Alice: Authentication Response
40
+
41
+ Alice -> Bob: Another authentication Request
42
+ Alice <-- Bob: another authentication Response
43
+ ....
44
+ INPUT
45
+ #{BLANK_HDR}
46
+ <sections><figure id="_">
47
+ <image src="plantuml/20.png" id="_" imagetype="PNG" height="auto" width="auto"/>
48
+ </figure>
49
+ <figure id="_">
50
+ <image src="plantuml/29.png" id="_" imagetype="PNG" height="auto" width="auto"/>
51
+ </figure></sections>
52
+
53
+ </iso-standard>
54
+ OUTPUT
55
+ end
56
+
57
+ it "processes the PlantUML macro with PlantUML disabled" do
58
+ mock_plantuml_disabled
59
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{PlantUML not installed}).to_stderr
60
+ #{ASCIIDOC_BLANK_HDR}
61
+
62
+ [plantuml]
63
+ ....
64
+ @startuml
65
+ Alice -> Bob: Authentication Request
66
+ Bob --> Alice: Authentication Response
67
+
68
+ Alice -> Bob: Another authentication Request
69
+ Alice <-- Bob: another authentication Response
70
+ @enduml
71
+ ....
72
+ INPUT
73
+
74
+ mock_plantuml_disabled
75
+ expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
76
+ #{ASCIIDOC_BLANK_HDR}
77
+
78
+ [plantuml]
79
+ ....
80
+ @startuml
81
+ Alice -> Bob: Authentication Request
82
+ Bob --> Alice: Authentication Response
83
+
84
+ Alice -> Bob: Another authentication Request
85
+ Alice <-- Bob: another authentication Response
86
+ @enduml
87
+ ....
88
+ INPUT
89
+ #{BLANK_HDR}
90
+ <sections>
91
+ <sourcecode id="_">@startuml
92
+ Alice -&gt; Bob: Authentication Request
93
+ Bob --&gt; Alice: Authentication Response
94
+
95
+ Alice -&gt; Bob: Another authentication Request
96
+ Alice &lt;-- Bob: another authentication Response
97
+ @enduml</sourcecode>
98
+ </sourcecode>
99
+ </iso-standard>
100
+ OUTPUT
101
+ end
102
+
103
+
104
+ private
105
+
106
+ def mock_plantuml_disabled
107
+ expect(Asciidoctor::ISO::PlantUMLBlockMacroBackend).to receive(:plantuml_installed?) do
108
+ false
109
+ end
110
+ end
20
111
  end
@@ -1,7 +1,8 @@
1
1
  require "spec_helper"
2
2
 
3
- RSpec.describe "warns when missing a title" do
4
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Table should have title/).to_stderr }
3
+ RSpec.describe Asciidoctor::ISO do
4
+ it "warns when missing a title" do
5
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Table should have title/).to_stderr
5
6
  #{VALIDATING_BLANK_HDR}
6
7
  |===
7
8
  |A |B |C
@@ -12,8 +13,8 @@ RSpec.describe "warns when missing a title" do
12
13
  end
13
14
 
14
15
 
15
- RSpec.describe "warn that introduction may contain requirement" do
16
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Introduction may contain requirement/).to_stderr }
16
+ it "warns that introduction may contain requirement" do
17
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Introduction may contain requirement/).to_stderr
17
18
  #{VALIDATING_BLANK_HDR}
18
19
  == Introduction
19
20
 
@@ -21,8 +22,8 @@ RSpec.describe "warn that introduction may contain requirement" do
21
22
  INPUT
22
23
  end
23
24
 
24
- RSpec.describe "warn that foreword may contain recommendation" do
25
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Foreword may contain recommendation/).to_stderr }
25
+ it "warns that foreword may contain recommendation" do
26
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Foreword may contain recommendation/).to_stderr
26
27
  #{VALIDATING_BLANK_HDR}
27
28
 
28
29
  It is not recommended that widgets should be larger than 15 cm.
@@ -31,8 +32,8 @@ RSpec.describe "warn that foreword may contain recommendation" do
31
32
  INPUT
32
33
  end
33
34
 
34
- RSpec.describe "warn that foreword may contain permission" do
35
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Foreword may contain permission/).to_stderr }
35
+ it "warns that foreword may contain permission" do
36
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Foreword may contain permission/).to_stderr
36
37
  #{VALIDATING_BLANK_HDR}
37
38
 
38
39
  No widget is required to be larger than 15 cm.
@@ -41,8 +42,8 @@ RSpec.describe "warn that foreword may contain permission" do
41
42
  INPUT
42
43
  end
43
44
 
44
- RSpec.describe "warn that scope may contain recommendation" do
45
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Scope may contain recommendation/).to_stderr }
45
+ it "warns that scope may contain recommendation" do
46
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Scope may contain recommendation/).to_stderr
46
47
  #{VALIDATING_BLANK_HDR}
47
48
 
48
49
  == Scope
@@ -50,8 +51,8 @@ RSpec.describe "warn that scope may contain recommendation" do
50
51
  INPUT
51
52
  end
52
53
 
53
- RSpec.describe "warn that definition may contain requirement" do
54
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Definition may contain requirement/).to_stderr }
54
+ it "warns that definition may contain requirement" do
55
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Definition may contain requirement/).to_stderr
55
56
  #{VALIDATING_BLANK_HDR}
56
57
 
57
58
  == Terms and Definitions
@@ -63,8 +64,8 @@ RSpec.describe "warn that definition may contain requirement" do
63
64
  INPUT
64
65
  end
65
66
 
66
- RSpec.describe "warn that term example may contain recommendation" do
67
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Term Example may contain recommendation/).to_stderr }
67
+ it "warns that term example may contain recommendation" do
68
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Term Example may contain recommendation/).to_stderr
68
69
  #{VALIDATING_BLANK_HDR}
69
70
 
70
71
  == Terms and Definitions
@@ -76,24 +77,24 @@ RSpec.describe "warn that term example may contain recommendation" do
76
77
  INPUT
77
78
  end
78
79
 
79
- RSpec.describe "warn that note may contain recommendation" do
80
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Note may contain recommendation/).to_stderr }
80
+ it "warns that note may contain recommendation" do
81
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Note may contain recommendation/).to_stderr
81
82
  #{VALIDATING_BLANK_HDR}
82
83
 
83
84
  NOTE: It is not recommended that widgets should be larger than 15 cm.
84
85
  INPUT
85
86
  end
86
87
 
87
- RSpec.describe "warn that footnote may contain recommendation" do
88
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Footnote may contain recommendation/).to_stderr }
88
+ it "warns that footnote may contain recommendation" do
89
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Footnote may contain recommendation/).to_stderr
89
90
  #{VALIDATING_BLANK_HDR}
90
91
 
91
92
  footnote:[It is not recommended that widgets should be larger than 15 cm.]
92
93
  INPUT
93
94
  end
94
95
 
95
- RSpec.describe "warn that term source is not in expected format" do
96
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/term reference not in expected format/).to_stderr }
96
+ it "warns that term source is not in expected format" do
97
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/term reference not in expected format/).to_stderr
97
98
  #{VALIDATING_BLANK_HDR}
98
99
 
99
100
  [.source]
@@ -101,16 +102,16 @@ RSpec.describe "warn that term source is not in expected format" do
101
102
  INPUT
102
103
  end
103
104
 
104
- RSpec.describe "warn that figure does not have title" do
105
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Figure should have title/).to_stderr }
105
+ it "warns that figure does not have title" do
106
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/Figure should have title/).to_stderr
106
107
  #{VALIDATING_BLANK_HDR}
107
108
 
108
109
  image::spec/examples/rice_images/rice_image1.png[]
109
110
  INPUT
110
111
  end
111
112
 
112
- RSpec.describe "warn that callouts do not match annotations" do
113
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/mismatch of callouts and annotations/).to_stderr }
113
+ it "warns that callouts do not match annotations" do
114
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/mismatch of callouts and annotations/).to_stderr
114
115
  #{VALIDATING_BLANK_HDR}
115
116
  [source,ruby]
116
117
  --
@@ -124,8 +125,8 @@ RSpec.describe "warn that callouts do not match annotations" do
124
125
  INPUT
125
126
  end
126
127
 
127
- RSpec.describe "term source is not a real reference" do
128
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/iso123 is not a real reference/).to_stderr }
128
+ it "warns that term source is not a real reference" do
129
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/iso123 is not a real reference/).to_stderr
129
130
  #{VALIDATING_BLANK_HDR}
130
131
 
131
132
  [.source]
@@ -133,8 +134,8 @@ RSpec.describe "term source is not a real reference" do
133
134
  INPUT
134
135
  end
135
136
 
136
- RSpec.describe "undated reference has locality" do
137
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/undated reference ISO 123 should not contain specific elements/).to_stderr }
137
+ it "warns that ndated reference has locality" do
138
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/undated reference ISO 123 should not contain specific elements/).to_stderr
138
139
  #{VALIDATING_BLANK_HDR}
139
140
 
140
141
  == Scope
@@ -146,8 +147,8 @@ RSpec.describe "undated reference has locality" do
146
147
  INPUT
147
148
  end
148
149
 
149
- RSpec.describe "Non-reference in bibliography" do
150
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/no anchor on reference/).to_stderr }
150
+ it "warns of Non-reference in bibliography" do
151
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(/no anchor on reference/).to_stderr
151
152
  #{VALIDATING_BLANK_HDR}
152
153
 
153
154
  == Normative References
@@ -155,8 +156,8 @@ RSpec.describe "Non-reference in bibliography" do
155
156
  INPUT
156
157
  end
157
158
 
158
- RSpec.describe "Non-ISO reference in Normative References" do
159
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-ISO/IEC reference not expected as normative}).to_stderr }
159
+ it "warns of Non-ISO reference in Normative References" do
160
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-ISO/IEC reference not expected as normative}).to_stderr
160
161
  #{VALIDATING_BLANK_HDR}
161
162
 
162
163
  [bibliography]
@@ -165,8 +166,8 @@ RSpec.describe "Non-ISO reference in Normative References" do
165
166
  INPUT
166
167
  end
167
168
 
168
- RSpec.describe "Scope contains subclauses" do
169
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Scope contains subclauses: should be succint}).to_stderr }
169
+ it "warns that Scope contains subclauses" do
170
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Scope contains subclauses: should be succint}).to_stderr
170
171
  #{VALIDATING_BLANK_HDR}
171
172
 
172
173
  == Scope
@@ -176,8 +177,8 @@ RSpec.describe "Scope contains subclauses" do
176
177
  end
177
178
 
178
179
 
179
- RSpec.describe "Table should have title" do
180
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Table should have title}).to_stderr }
180
+ it "warns that Table should have title" do
181
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Table should have title}).to_stderr
181
182
  #{VALIDATING_BLANK_HDR}
182
183
 
183
184
  |===
@@ -186,8 +187,8 @@ RSpec.describe "Table should have title" do
186
187
  INPUT
187
188
  end
188
189
 
189
- RSpec.describe "Style warning if number not broken up in threes" do
190
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{number not broken up in threes}).to_stderr }
190
+ it "gives Style warning if number not broken up in threes" do
191
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{number not broken up in threes}).to_stderr
191
192
  #{VALIDATING_BLANK_HDR}
192
193
 
193
194
  == Clause
@@ -195,8 +196,8 @@ RSpec.describe "Style warning if number not broken up in threes" do
195
196
  INPUT
196
197
  end
197
198
 
198
- RSpec.describe "No style warning if number not broken up in threes is ISO reference" do
199
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to_not output(%r{number not broken up in threes}).to_stderr }
199
+ it "gives No style warning if number not broken up in threes is ISO reference" do
200
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to_not output(%r{number not broken up in threes}).to_stderr
200
201
  #{VALIDATING_BLANK_HDR}
201
202
 
202
203
  == Clause
@@ -204,8 +205,8 @@ RSpec.describe "No style warning if number not broken up in threes is ISO refere
204
205
  INPUT
205
206
  end
206
207
 
207
- RSpec.describe "Style warning if decimal point" do
208
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{possible decimal point}).to_stderr }
208
+ it "Style warning if decimal point" do
209
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{possible decimal point}).to_stderr
209
210
  #{VALIDATING_BLANK_HDR}
210
211
 
211
212
  == Clause
@@ -213,8 +214,8 @@ RSpec.describe "Style warning if decimal point" do
213
214
  INPUT
214
215
  end
215
216
 
216
- RSpec.describe "Style warning if billion used" do
217
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{ambiguous number}).to_stderr }
217
+ it "Style warning if billion used" do
218
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{ambiguous number}).to_stderr
218
219
  #{VALIDATING_BLANK_HDR}
219
220
 
220
221
  == Clause
@@ -222,8 +223,8 @@ RSpec.describe "Style warning if billion used" do
222
223
  INPUT
223
224
  end
224
225
 
225
- RSpec.describe "Style warning if no space before percent sign" do
226
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{no space before percent sign}).to_stderr }
226
+ it "Style warning if no space before percent sign" do
227
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{no space before percent sign}).to_stderr
227
228
  #{VALIDATING_BLANK_HDR}
228
229
 
229
230
  == Clause
@@ -231,8 +232,8 @@ RSpec.describe "Style warning if no space before percent sign" do
231
232
  INPUT
232
233
  end
233
234
 
234
- RSpec.describe "Style warning if unbracketed tolerance before percent sign" do
235
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{unbracketed tolerance before percent sign}).to_stderr }
235
+ it "Style warning if unbracketed tolerance before percent sign" do
236
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{unbracketed tolerance before percent sign}).to_stderr
236
237
  #{VALIDATING_BLANK_HDR}
237
238
 
238
239
  == Clause
@@ -240,8 +241,8 @@ RSpec.describe "Style warning if unbracketed tolerance before percent sign" do
240
241
  INPUT
241
242
  end
242
243
 
243
- RSpec.describe "Style warning if dots in abbreviation" do
244
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{no dots in abbreviation}).to_stderr }
244
+ it "Style warning if dots in abbreviation" do
245
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{no dots in abbreviation}).to_stderr
245
246
  #{VALIDATING_BLANK_HDR}
246
247
 
247
248
  == Clause
@@ -249,8 +250,8 @@ RSpec.describe "Style warning if dots in abbreviation" do
249
250
  INPUT
250
251
  end
251
252
 
252
- RSpec.describe "No Style warning if dots in abbreviation are e.g." do
253
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to_not output(%r{no dots in abbreviation}).to_stderr }
253
+ it "No Style warning if dots in abbreviation are e.g." do
254
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to_not output(%r{no dots in abbreviation}).to_stderr
254
255
  #{VALIDATING_BLANK_HDR}
255
256
 
256
257
  == Clause
@@ -258,8 +259,8 @@ RSpec.describe "No Style warning if dots in abbreviation are e.g." do
258
259
  INPUT
259
260
  end
260
261
 
261
- RSpec.describe "Style warning if ppm used" do
262
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{language-specific abbreviation}).to_stderr }
262
+ it "Style warning if ppm used" do
263
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{language-specific abbreviation}).to_stderr
263
264
  #{VALIDATING_BLANK_HDR}
264
265
 
265
266
  == Clause
@@ -267,8 +268,8 @@ RSpec.describe "Style warning if ppm used" do
267
268
  INPUT
268
269
  end
269
270
 
270
- RSpec.describe "Style warning if space between number and degree" do
271
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{space between number and degrees/minutes/seconds}).to_stderr }
271
+ it "Style warning if space between number and degree" do
272
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{space between number and degrees/minutes/seconds}).to_stderr
272
273
  #{VALIDATING_BLANK_HDR}
273
274
 
274
275
  == Clause
@@ -276,8 +277,8 @@ RSpec.describe "Style warning if space between number and degree" do
276
277
  INPUT
277
278
  end
278
279
 
279
- RSpec.describe "Style warning if no space between number and SI unit" do
280
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{no space between number and SI unit}).to_stderr }
280
+ it "Style warning if no space between number and SI unit" do
281
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{no space between number and SI unit}).to_stderr
281
282
  #{VALIDATING_BLANK_HDR}
282
283
 
283
284
  == Clause
@@ -285,8 +286,8 @@ RSpec.describe "Style warning if no space between number and SI unit" do
285
286
  INPUT
286
287
  end
287
288
 
288
- RSpec.describe "Style warning if mins used" do
289
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-standard unit}).to_stderr }
289
+ it "Style warning if mins used" do
290
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-standard unit}).to_stderr
290
291
  #{VALIDATING_BLANK_HDR}
291
292
 
292
293
  == Clause
@@ -295,16 +296,16 @@ RSpec.describe "Style warning if mins used" do
295
296
  end
296
297
 
297
298
  # can't test: our asciidoc template won't allow this to be generated
298
- # RSpec.describe "Style warning if foreword contains subclauses" do
299
- # specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-standard unit}).to_stderr }
299
+ # it "Style warning if foreword contains subclauses" do
300
+ # expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{non-standard unit}).to_stderr
300
301
  # #{VALIDATING_BLANK_HDR}
301
302
  #
302
303
  # INPUT
303
304
  # end
304
305
 
305
306
  # can't test: we strip out any such content from Normative references preemptively
306
- #RSpec.describe "Style warning if Normative References contains subclauses" do
307
- #specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{normative references contains subclauses}).to_stderr }
307
+ #it "Style warning if Normative References contains subclauses" do
308
+ #expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{normative references contains subclauses}).to_stderr
308
309
  ##{VALIDATING_BLANK_HDR}
309
310
  #
310
311
  #[bibliography]
@@ -314,8 +315,8 @@ end
314
315
  #INPUT
315
316
  #end
316
317
 
317
- RSpec.describe "Style warning if two Symbols and Abbreviated Terms sections" do
318
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{only one Symbols and Abbreviated Terms section in the standard}).to_stderr }
318
+ it "Style warning if two Symbols and Abbreviated Terms sections" do
319
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{only one Symbols and Abbreviated Terms section in the standard}).to_stderr
319
320
  #{VALIDATING_BLANK_HDR}
320
321
 
321
322
  == Terms and Abbreviations
@@ -326,8 +327,8 @@ RSpec.describe "Style warning if two Symbols and Abbreviated Terms sections" do
326
327
  INPUT
327
328
  end
328
329
 
329
- RSpec.describe "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
330
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Symbols and Abbreviated Terms can only contain a definition list}).to_stderr }
330
+ it "Style warning if Symbols and Abbreviated Terms contains extraneous matter" do
331
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Symbols and Abbreviated Terms can only contain a definition list}).to_stderr
331
332
  #{VALIDATING_BLANK_HDR}
332
333
 
333
334
  == Symbols and Abbreviated Terms
@@ -336,8 +337,8 @@ RSpec.describe "Style warning if Symbols and Abbreviated Terms contains extraneo
336
337
  INPUT
337
338
  end
338
339
 
339
- RSpec.describe "Warning if do not start with scope or introduction" do
340
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Prefatory material must be followed by \(clause\) Scope}).to_stderr }
340
+ it "Warning if do not start with scope or introduction" do
341
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Prefatory material must be followed by \(clause\) Scope}).to_stderr
341
342
  #{VALIDATING_BLANK_HDR}
342
343
 
343
344
  == Symbols and Abbreviated Terms
@@ -346,8 +347,8 @@ RSpec.describe "Warning if do not start with scope or introduction" do
346
347
  INPUT
347
348
  end
348
349
 
349
- RSpec.describe "Warning if introduction not followed by scope" do
350
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Prefatory material must be followed by \(clause\) Scope}).to_stderr }
350
+ it "Warning if introduction not followed by scope" do
351
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Prefatory material must be followed by \(clause\) Scope}).to_stderr
351
352
  #{VALIDATING_BLANK_HDR}
352
353
 
353
354
  .Foreword
@@ -361,8 +362,8 @@ RSpec.describe "Warning if introduction not followed by scope" do
361
362
  INPUT
362
363
  end
363
364
 
364
- RSpec.describe "Warning if normative references not followed by terms and definitions" do
365
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Normative References must be followed by Terms and Definitions}).to_stderr }
365
+ it "Warning if normative references not followed by terms and definitions" do
366
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Normative References must be followed by Terms and Definitions}).to_stderr
366
367
  #{VALIDATING_BLANK_HDR}
367
368
 
368
369
  .Foreword
@@ -379,8 +380,8 @@ RSpec.describe "Warning if normative references not followed by terms and defini
379
380
  INPUT
380
381
  end
381
382
 
382
- RSpec.describe "Warning if there are no clauses in the document" do
383
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Document must contain clause after Terms and Definitions}).to_stderr }
383
+ it "Warning if there are no clauses in the document" do
384
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Document must contain clause after Terms and Definitions}).to_stderr
384
385
  #{VALIDATING_BLANK_HDR}
385
386
 
386
387
  .Foreword
@@ -398,8 +399,8 @@ RSpec.describe "Warning if there are no clauses in the document" do
398
399
  INPUT
399
400
  end
400
401
 
401
- RSpec.describe "Warning if scope occurs after Terms and Definitions" do
402
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Scope must occur before Terms and Definitions}).to_stderr }
402
+ it "Warning if scope occurs after Terms and Definitions" do
403
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Scope must occur before Terms and Definitions}).to_stderr
403
404
  #{VALIDATING_BLANK_HDR}
404
405
 
405
406
  .Foreword
@@ -417,8 +418,8 @@ RSpec.describe "Warning if scope occurs after Terms and Definitions" do
417
418
  INPUT
418
419
  end
419
420
 
420
- RSpec.describe "Warning if scope occurs after Terms and Definitions" do
421
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Scope must occur before Terms and Definitions}).to_stderr }
421
+ it "Warning if scope occurs after Terms and Definitions" do
422
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Scope must occur before Terms and Definitions}).to_stderr
422
423
  #{VALIDATING_BLANK_HDR}
423
424
 
424
425
  .Foreword
@@ -438,8 +439,8 @@ RSpec.describe "Warning if scope occurs after Terms and Definitions" do
438
439
  INPUT
439
440
  end
440
441
 
441
- RSpec.describe "Warning if Symbols and Abbreviated Terms does not occur immediately after Terms and Definitions" do
442
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Only annexes and references can follow clauses}).to_stderr }
442
+ it "Warning if Symbols and Abbreviated Terms does not occur immediately after Terms and Definitions" do
443
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Only annexes and references can follow clauses}).to_stderr
443
444
  #{VALIDATING_BLANK_HDR}
444
445
 
445
446
  .Foreword
@@ -459,8 +460,8 @@ RSpec.describe "Warning if Symbols and Abbreviated Terms does not occur immediat
459
460
  INPUT
460
461
  end
461
462
 
462
- RSpec.describe "Warning if no normative references" do
463
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Document must include \(references\) Normative References}).to_stderr }
463
+ it "Warning if no normative references" do
464
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Document must include \(references\) Normative References}).to_stderr
464
465
  #{VALIDATING_BLANK_HDR}
465
466
 
466
467
  .Foreword
@@ -484,8 +485,8 @@ RSpec.describe "Warning if no normative references" do
484
485
  INPUT
485
486
  end
486
487
 
487
- RSpec.describe "Warning if final section is not named Bibliography" do
488
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{There are sections after the final Bibliography}).to_stderr }
488
+ it "Warning if final section is not named Bibliography" do
489
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{There are sections after the final Bibliography}).to_stderr
489
490
  #{VALIDATING_BLANK_HDR}
490
491
 
491
492
  .Foreword
@@ -515,8 +516,8 @@ RSpec.describe "Warning if final section is not named Bibliography" do
515
516
  INPUT
516
517
  end
517
518
 
518
- RSpec.describe "Warning if final section is not styled Bibliography" do
519
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Section not marked up as \[bibliography\]!}).to_stderr }
519
+ it "Warning if final section is not styled Bibliography" do
520
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Section not marked up as \[bibliography\]!}).to_stderr
520
521
  #{VALIDATING_BLANK_HDR}
521
522
 
522
523
  .Foreword
@@ -542,121 +543,131 @@ RSpec.describe "Warning if final section is not styled Bibliography" do
542
543
  INPUT
543
544
  end
544
545
 
545
- RSpec.describe "Warning if English title intro and no French title intro" do
546
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No French Title Intro!}).to_stderr }
546
+ it "Warning if English title intro and no French title intro" do
547
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No French Title Intro!}).to_stderr
547
548
  = Document title
548
549
  Author
549
550
  :docfile: test.adoc
550
551
  :nodoc:
551
552
  :title-intro-en: Title
553
+ :no-isobib:
552
554
 
553
555
  INPUT
554
556
  end
555
557
 
556
- RSpec.describe "Warning if French title intro and no English title intro" do
557
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No English Title Intro!}).to_stderr }
558
+ it "Warning if French title intro and no English title intro" do
559
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No English Title Intro!}).to_stderr
558
560
  = Document title
559
561
  Author
560
562
  :docfile: test.adoc
561
563
  :nodoc:
562
564
  :title-intro-fr: Title
565
+ :no-isobib:
563
566
 
564
567
  INPUT
565
568
  end
566
569
 
567
570
 
568
- RSpec.describe "Warning if English title and no French intro" do
569
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No French Title!}).to_stderr }
571
+ it "Warning if English title and no French intro" do
572
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No French Title!}).to_stderr
570
573
  = Document title
571
574
  Author
572
575
  :docfile: test.adoc
573
576
  :nodoc:
574
577
  :title-main-en: Title
578
+ :no-isobib:
575
579
 
576
580
  INPUT
577
581
  end
578
582
 
579
- RSpec.describe "Warning if French title and no English title" do
580
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No English Title!}).to_stderr }
583
+ it "Warning if French title and no English title" do
584
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No English Title!}).to_stderr
581
585
  = Document title
582
586
  Author
583
587
  :docfile: test.adoc
584
588
  :nodoc:
585
589
  :title-main-fr: Title
590
+ :no-isobib:
586
591
 
587
592
  INPUT
588
593
  end
589
594
 
590
- RSpec.describe "Warning if English title part and no French title part" do
591
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No French Title Part!}).to_stderr }
595
+ it "Warning if English title part and no French title part" do
596
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No French Title Part!}).to_stderr
592
597
  = Document title
593
598
  Author
594
599
  :docfile: test.adoc
595
600
  :nodoc:
596
601
  :title-part-en: Title
602
+ :no-isobib:
597
603
 
598
604
  INPUT
599
605
  end
600
606
 
601
- RSpec.describe "Warning if French title part and no English title part" do
602
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No English Title Part!}).to_stderr }
607
+ it "Warning if French title part and no English title part" do
608
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{No English Title Part!}).to_stderr
603
609
  = Document title
604
610
  Author
605
611
  :docfile: test.adoc
606
612
  :nodoc:
607
613
  :title-part-fr: Title
614
+ :no-isobib:
608
615
 
609
616
  INPUT
610
617
  end
611
618
 
612
- RSpec.describe "Warning if non-IEC document with subpart" do
613
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Subpart defined on non-IEC document!}).to_stderr }
619
+ it "Warning if non-IEC document with subpart" do
620
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Subpart defined on non-IEC document!}).to_stderr
614
621
  = Document title
615
622
  Author
616
623
  :docfile: test.adoc
617
624
  :nodoc:
618
625
  :partnumber: 1-1
619
626
  :publisher: ISO
627
+ :no-isobib:
620
628
 
621
629
  INPUT
622
630
  end
623
631
 
624
- RSpec.describe "No warning if joint IEC/non-IEC document with subpart" do
625
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{Subpart defined on non-IEC document!}).to_stderr }
632
+ it "No warning if joint IEC/non-IEC document with subpart" do
633
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{Subpart defined on non-IEC document!}).to_stderr
626
634
  = Document title
627
635
  Author
628
636
  :docfile: test.adoc
629
637
  :nodoc:
630
638
  :partnumber: 1-1
631
639
  :publisher: ISO,IEC
640
+ :no-isobib:
632
641
 
633
642
  INPUT
634
643
  end
635
644
 
636
- RSpec.describe "Warning if main title contains document type" do
637
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Main Title may name document type}).to_stderr }
645
+ it "Warning if main title contains document type" do
646
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Main Title may name document type}).to_stderr
638
647
  = Document title
639
648
  Author
640
649
  :docfile: test.adoc
641
650
  :nodoc:
642
651
  :title-main-en: A Technical Specification on Widgets
652
+ :no-isobib:
643
653
 
644
654
  INPUT
645
655
  end
646
656
 
647
- RSpec.describe "Warning if intro title contains document type" do
648
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Title Intro may name document type}).to_stderr }
657
+ it "Warning if intro title contains document type" do
658
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Title Intro may name document type}).to_stderr
649
659
  = Document title
650
660
  Author
651
661
  :docfile: test.adoc
652
662
  :nodoc:
653
663
  :title-intro-en: A Technical Specification on Widgets
664
+ :no-isobib:
654
665
 
655
666
  INPUT
656
667
  end
657
668
 
658
- RSpec.describe "Each first-level subclause must have a title" do
659
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{each first-level subclause must have a title}).to_stderr }
669
+ it "Each first-level subclause must have a title" do
670
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{each first-level subclause must have a title}).to_stderr
660
671
  #{VALIDATING_BLANK_HDR}
661
672
  == Clause
662
673
 
@@ -664,8 +675,8 @@ RSpec.describe "Each first-level subclause must have a title" do
664
675
  INPUT
665
676
  end
666
677
 
667
- RSpec.describe "All subclauses must have a title, or none" do
668
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{all subclauses must have a title, or none}).to_stderr }
678
+ it "All subclauses must have a title, or none" do
679
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{all subclauses must have a title, or none}).to_stderr
669
680
  #{VALIDATING_BLANK_HDR}
670
681
  == Clause
671
682
 
@@ -677,8 +688,8 @@ RSpec.describe "All subclauses must have a title, or none" do
677
688
  INPUT
678
689
  end
679
690
 
680
- RSpec.describe "Warning if subclause is only child of its parent, or none" do
681
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{subclause is only child}).to_stderr }
691
+ it "Warning if subclause is only child of its parent, or none" do
692
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{subclause is only child}).to_stderr
682
693
  #{VALIDATING_BLANK_HDR}
683
694
  == Clause
684
695
 
@@ -687,41 +698,44 @@ RSpec.describe "Warning if subclause is only child of its parent, or none" do
687
698
  INPUT
688
699
  end
689
700
 
690
- RSpec.describe "Warning if invalid technical committee type" do
691
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{invalid technical committee type}).to_stderr }
701
+ it "Warning if invalid technical committee type" do
702
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{invalid technical committee type}).to_stderr
692
703
  = Document title
693
704
  Author
694
705
  :docfile: test.adoc
695
706
  :nodoc:
696
707
  :technical-committee-type: X
708
+ :no-isobib:
697
709
 
698
710
  INPUT
699
711
  end
700
712
 
701
- RSpec.describe "Warning if invalid subcommittee type" do
702
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{invalid subcommittee type}).to_stderr }
713
+ it "Warning if invalid subcommittee type" do
714
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{invalid subcommittee type}).to_stderr
703
715
  = Document title
704
716
  Author
705
717
  :docfile: test.adoc
706
718
  :nodoc:
707
719
  :subcommittee-type: X
720
+ :no-isobib:
708
721
 
709
722
  INPUT
710
723
  end
711
724
 
712
- RSpec.describe "Warning if invalid subcommittee type" do
713
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{invalid subcommittee type}).to_stderr }
725
+ it "Warning if invalid subcommittee type" do
726
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{invalid subcommittee type}).to_stderr
714
727
  = Document title
715
728
  Author
716
729
  :docfile: test.adoc
717
730
  :nodoc:
718
731
  :subcommittee-type: X
732
+ :no-isobib:
719
733
 
720
734
  INPUT
721
735
  end
722
736
 
723
- RSpec.describe "Warning if 'see' crossreference points to normative section" do
724
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{'see terms' is pointing to a normative section}).to_stderr }
737
+ it "Warning if 'see' crossreference points to normative section" do
738
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{'see terms' is pointing to a normative section}).to_stderr
725
739
  #{VALIDATING_BLANK_HDR}
726
740
  [[terms]]
727
741
  == Terms and Definitions
@@ -731,8 +745,8 @@ RSpec.describe "Warning if 'see' crossreference points to normative section" do
731
745
  INPUT
732
746
  end
733
747
 
734
- RSpec.describe "Warning if 'see' reference points to normative reference" do
735
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{is pointing to a normative reference}).to_stderr }
748
+ it "Warning if 'see' reference points to normative reference" do
749
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{is pointing to a normative reference}).to_stderr
736
750
  #{VALIDATING_BLANK_HDR}
737
751
  [bibliography]
738
752
  == Normative References
@@ -743,8 +757,8 @@ RSpec.describe "Warning if 'see' reference points to normative reference" do
743
757
  INPUT
744
758
  end
745
759
 
746
- RSpec.describe "Warning if term definition starts with article" do
747
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{term definition starts with article}).to_stderr }
760
+ it "Warning if term definition starts with article" do
761
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{term definition starts with article}).to_stderr
748
762
  #{VALIDATING_BLANK_HDR}
749
763
  == Terms and Definitions
750
764
 
@@ -754,8 +768,8 @@ RSpec.describe "Warning if term definition starts with article" do
754
768
  INPUT
755
769
  end
756
770
 
757
- RSpec.describe "Warning if term definition ends with period" do
758
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{term definition ends with period}).to_stderr }
771
+ it "Warning if term definition ends with period" do
772
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{term definition ends with period}).to_stderr
759
773
  #{VALIDATING_BLANK_HDR}
760
774
  == Terms and Definitions
761
775
 
@@ -765,8 +779,8 @@ RSpec.describe "Warning if term definition ends with period" do
765
779
  INPUT
766
780
  end
767
781
 
768
- RSpec.describe "validates document against ISO XML schema" do
769
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{value of attribute "align" is invalid; must be equal to}).to_stderr }
782
+ it "validates document against ISO XML schema" do
783
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{value of attribute "align" is invalid; must be equal to}).to_stderr
770
784
  #{VALIDATING_BLANK_HDR}
771
785
 
772
786
  [align=mid-air]
@@ -775,9 +789,14 @@ RSpec.describe "validates document against ISO XML schema" do
775
789
  end
776
790
 
777
791
 
778
- RSpec.describe "Warning if terms mismatches IEV" do
779
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Term "automation" does not match IEV 103-01-02 "functional"}).to_stderr }
780
- #{VALIDATING_BLANK_HDR}
792
+ it "Warning if terms mismatches IEV" do
793
+ system "mv ~/.iev.pstore ~/.iev.pstore1"
794
+ system "rm test.iev.pstore"
795
+ mock_open_uri('103-01-02')
796
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Term "automation" does not match IEV 103-01-02 "functional"}).to_stderr
797
+ = Document title
798
+ Author
799
+ :docfile: test.adoc
781
800
 
782
801
  [bibliography]
783
802
  == Normative References
@@ -789,11 +808,17 @@ RSpec.describe "Warning if terms mismatches IEV" do
789
808
  [.source]
790
809
  <<iev,clause="103-01-02">>
791
810
  INPUT
811
+ system "mv ~/.iev.pstore1 ~/.iev.pstore"
792
812
  end
793
813
 
794
- RSpec.describe "No warning if English term matches IEV" do
795
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr }
796
- #{VALIDATING_BLANK_HDR}
814
+ it "No warning if English term matches IEV" do
815
+ system "mv ~/.iev.pstore ~/.iev.pstore1"
816
+ system "rm test.iev.pstore"
817
+ mock_open_uri('103-01-02')
818
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr
819
+ = Document title
820
+ Author
821
+ :docfile: test.adoc
797
822
 
798
823
  [bibliography]
799
824
  == Normative References
@@ -805,15 +830,18 @@ RSpec.describe "No warning if English term matches IEV" do
805
830
  [.source]
806
831
  <<iev,clause="103-01-02">>
807
832
  INPUT
833
+ system "mv ~/.iev.pstore1 ~/.iev.pstore"
808
834
  end
809
835
 
810
- RSpec.describe "No warning if French term matches IEV" do
811
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr }
836
+ it "No warning if French term matches IEV" do
837
+ system "mv ~/.iev.pstore ~/.iev.pstore1"
838
+ system "rm test.iev.pstore"
839
+ mock_open_uri('103-01-02')
840
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{does not match IEV 103-01-02}).to_stderr
812
841
  = Document title
813
842
  Author
814
843
  :docfile: test.adoc
815
844
  :nodoc:
816
- :no-isobib:
817
845
  :language: fr
818
846
 
819
847
  [bibliography]
@@ -826,10 +854,11 @@ RSpec.describe "No warning if French term matches IEV" do
826
854
  [.source]
827
855
  <<iev,clause="103-01-02">>
828
856
  INPUT
857
+ system "mv ~/.iev.pstore1 ~/.iev.pstore"
829
858
  end
830
859
 
831
- RSpec.describe "Warn if more than 7 levels of subclause" do
832
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{exceeds the maximum clause depth of 7}).to_stderr }
860
+ it "Warn if more than 7 levels of subclause" do
861
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.to output(%r{Exceeds the maximum clause depth of 7}).to_stderr
833
862
  = Document title
834
863
  Author
835
864
  :docfile: test.adoc
@@ -859,8 +888,8 @@ RSpec.describe "Warn if more than 7 levels of subclause" do
859
888
  INPUT
860
889
  end
861
890
 
862
- RSpec.describe "Do not warn if not more than 7 levels of subclause" do
863
- specify { expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{exceeds the maximum clause depth of 7}).to_stderr }
891
+ it "Do not warn if not more than 7 levels of subclause" do
892
+ expect { Asciidoctor.convert(<<~"INPUT", backend: :iso, header_footer: true) }.not_to output(%r{exceeds the maximum clause depth of 7}).to_stderr
864
893
  = Document title
865
894
  Author
866
895
  :docfile: test.adoc
@@ -886,4 +915,4 @@ RSpec.describe "Do not warn if not more than 7 levels of subclause" do
886
915
 
887
916
  INPUT
888
917
  end
889
-
918
+ end