Skip to content

Commit

Permalink
adjust install tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Nov 2, 2022
1 parent 3136065 commit 17c66f7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 179 deletions.
149 changes: 0 additions & 149 deletions ext/commonmarker/commonmarker.c

This file was deleted.

18 changes: 0 additions & 18 deletions ext/commonmarker/commonmarker.h

This file was deleted.

17 changes: 5 additions & 12 deletions script/test-gem-installation
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,17 @@ describe gemspec.full_name do
let(:commonmarker_include_dir) { File.join(commonmarker_ext_dir, "include") }

# representative sample of the files
let(:commonmarker_header_files) { ["commonmarker.h"] }
let(:packaged_library_header_files) { ["comrak_ffi.h"] }
let(:commonmarker_files) { ["Cargo.toml"] }

it "loads the same version as the spec we've loaded" do
assert_equal(Commonmarker::VERSION, gemspec.version.to_s)
end

describe "cruby" do
it "installs commonmarker headers" do
commonmarker_header_files.each do |header|
assert(File.file?(File.join(commonmarker_ext_dir, header)),
"expected #{header} to be installed in #{commonmarker_ext_dir}")

found = false
headers_dirs.each do |header_dir|
found = true if File.file?(File.join(header_dir, "commonmarker.h"))
end
assert(found, "expected to find commonmarker.h in one of: #{headers_dirs.inspect}")
it "installs commonmarker files" do
commonmarker_cargo_toml.each do |file|
assert(File.file?(File.join(commonmarker_ext_dir, file)),
"expected #{file} to be installed in #{commonmarker_ext_dir}")
end
end
end
Expand Down

0 comments on commit 17c66f7

Please sign in to comment.