Skip to content

Commit

Permalink
Confirm that no gems are missing from the flavour stack: #347
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Nov 14, 2024
1 parent 57127d6 commit 527097f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/metanorma/flavor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def flavors
def gem_loading_error(flavor_name)
unless PRIVATE_SUPPORTED_GEMS.include?(flavor_name)
Metanorma::Cli::UI.error(
"[metanorma] Error: flavor gem #{flavor_name} not present",
"[metanorma] Error: flavor gem #{flavor_name} is not present!",
)
end
end
Expand Down
7 changes: 7 additions & 0 deletions spec/acceptance/version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
expect(output).to include("Metanorma::Ietf #{Metanorma::Ietf::VERSION}")
expect(output).to match /html2doc \d\.\d/
end

it "not raise error about dependencies" do
command = %w(version)
output = capture_stderr { Metanorma::Cli.start(command) }

expect(output).not_to match /is not present/
end
end
end
end
18 changes: 9 additions & 9 deletions spec/metanorma_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,15 +174,15 @@
# COMMENT context "with -r option specified" do
# moving this text to end of suite instead
context "with -r option specified" do
it "with -r option specified loads the libary and compile document" do
create_clean_test_files ASCIIDOC_PREAMBLE_HDR
system "bundle install"
compile_doc(source_file, "-t iso -r metanorma-iso --no-install-fonts")

expect_files_to_exists("test.xml", "test.html")
expect_files_to_not_exists("test.doc", "test.alt.html")
expect(file_content("test.xml")).to include("</iso-standard>")
end
it "with -r option specified loads the libary and compile document" do
create_clean_test_files ASCIIDOC_PREAMBLE_HDR
system "bundle install"
compile_doc(source_file, "-t iso -r metanorma-iso --no-install-fonts")

expect_files_to_exists("test.xml", "test.html")
expect_files_to_not_exists("test.doc", "test.alt.html")
expect(file_content("test.xml")).to include("</iso-standard>")
end
end

%w[rfc sts].each do |type|
Expand Down

0 comments on commit 527097f

Please sign in to comment.