metanorma-standoc 1.8.6 → 1.8.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,80 +0,0 @@
1
- require "spec_helper"
2
-
3
- RSpec.describe 'Lutaml macros' do
4
- let(:example_file) { fixtures_path("test.exp") }
5
-
6
- context "Array of hashes" do
7
- let(:input) do
8
- <<~TEXT
9
- = Document title
10
- Author
11
- :docfile: test.adoc
12
- :nodoc:
13
- :novalid:
14
- :no-isobib:
15
- :imagesdir: spec/assets
16
-
17
- [lutaml,#{example_file},my_context]
18
- ----
19
-
20
- {% for schema in my_context.schemas %}
21
- == {{schema.id}}
22
-
23
- {% for entity in schema.entities %}
24
- === {{entity.id}}
25
- supertypes -> {{entity.supertypes.id}}
26
- explicit -> {{entity.explicit.first.id}}
27
-
28
- {% endfor %}
29
-
30
- {% endfor %}
31
- ----
32
- TEXT
33
- end
34
- let(:output) do
35
- <<~TEXT
36
- #{BLANK_METANORMA_HDR}
37
- <sections>
38
- <clause id="_" inline-header="false" obligation="normative"><title>annotated_3d_model_data_quality_criteria_schema</title>
39
- <clause id="_" inline-header="false" obligation="normative">
40
- <title>a3m_data_quality_criteria_representation</title>
41
- <p id="_">supertypes →
42
- explicit → </p>
43
- </clause>
44
- <clause id="_" inline-header="false" obligation="normative">
45
- <title>a3m_data_quality_criterion</title>
46
- <p id="_">supertypes →
47
- explicit → </p>
48
- </clause>
49
- <clause id="_" inline-header="false" obligation="normative">
50
- <title>a3m_data_quality_criterion_specific_applied_value</title>
51
- <p id="_">supertypes →
52
- explicit → </p>
53
- </clause>
54
- <clause id="_" inline-header="false" obligation="normative">
55
- <title>a3m_data_quality_target_accuracy_association</title>
56
- <p id="_">supertypes →
57
- explicit → </p>
58
- </clause>
59
- <clause id="_" inline-header="false" obligation="normative">
60
- <title>a3m_detailed_report_request</title>
61
- <p id="_">supertypes →
62
- explicit → </p>
63
- </clause>
64
- <clause id="_" inline-header="false" obligation="normative">
65
- <title>a3m_summary_report_request_with_representative_value</title>
66
- <p id="_">supertypes →
67
- explicit → </p>
68
- </clause></clause>
69
- </sections>
70
- </standard-document>
71
- </body></html>
72
- TEXT
73
- end
74
-
75
- it "correctly renders input" do
76
- expect(xml_string_conent(metanorma_process(input)))
77
- .not_to(be_equivalent_to(output))
78
- end
79
- end
80
- end