Skip to content

Commit

Permalink
rspec
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Aug 23, 2024
1 parent 47207ce commit 409b71d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions spec/metanorma/base_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,9 @@
doc = Asciidoctor.convert(input, *OPTIONS).gsub(
/ schema-version="[^"]+"/, ""
)
expect(doc).to include '<eref type="inline" bibitemid="I-D.abarth-cake" citeas="Internet-Draft draft-abarth-cake-01"/>'
expect(doc).to include '<bibitem id="I-D.abarth-cake" type="standard">'
expect(doc).to include '<uri type="src">https://datatracker.ietf.org/doc/html/draft-abarth-cake-01</uri>'
expect(doc).to include('<eref type="inline" bibitemid="I-D.abarth-cake" citeas="Internet-Draft draft-abarth-cake-01"/>')
expect(doc).to include('<bibitem id="I-D.abarth-cake" type="standard">')
expect(doc).to include('<uri type="src">https://datatracker.ietf.org/doc/html/draft-abarth-cake-01</uri>')
end
end

Expand Down
18 changes: 9 additions & 9 deletions spec/metanorma/validate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
image::spec/assets/rice_image1.png[]
INPUT
expect(File.read("test.err.html"))
.to include "image spec/​assets/rice_​image1.png is not SVG"
.to include("image spec/​assets/rice_​image1.png is not SVG")
end

it "does not warn that image is SVG" do
Expand All @@ -21,7 +21,7 @@
image::spec/assets/Example.svg[]
INPUT
if File.exist?("test.err.html")
expect(File.read("test.err.html")).not_to include "is not SVG"
expect(File.read("test.err.html")).not_to include("is not SVG")
end
end

Expand All @@ -37,7 +37,7 @@
INPUT
expect(File.read("test.err.html"))
.to include "Editorial stream must have Informational status"
.to include("Editorial stream must have Informational status")

FileUtils.rm_f "test.err.html"
Asciidoctor.convert(<<~INPUT, *OPTIONS)
Expand All @@ -50,7 +50,7 @@
INPUT
expect(File.read("test.err.html"))
.not_to include "Editorial stream must have Informational status"
.not_to include("Editorial stream must have Informational status")
end

it "warns of invalid workgroup" do
Expand All @@ -65,7 +65,7 @@
:flush-caches: true
INPUT
expect(File.read("test.err.html")).to include "unrecognised working group"
expect(File.read("test.err.html")).to include("unrecognised working group")
end
end

Expand All @@ -82,7 +82,7 @@
INPUT
if File.exist?("test.err.html")
expect(File.read("test.err.html")).not_to include "unrecognised working group"
expect(File.read("test.err.html")).not_to include("unrecognised working group")
end
end
end
Expand Down Expand Up @@ -114,9 +114,9 @@
INPUT
if File.exist?("test.err.html")
expect(File.read("test.err.html")).to include "No matching review for cref:​[xyz]"
expect(File.read("test.err.html")).to include "No matching review for cref:​[abc]"
expect(File.read("test.err.html")).not_to include "No matching review for cref:​[def]"
expect(File.read("test.err.html")).to include("No matching review for cref:​[xyz]")
expect(File.read("test.err.html")).to include("No matching review for cref:​[abc]")
expect(File.read("test.err.html")).not_to include("No matching review for cref:​[def]")
end
end

Expand Down

0 comments on commit 409b71d

Please sign in to comment.