Sha256: 87b80c417d1fd04e5faae57f9e38948e80af16a73de6d63cae81a73f4ca55da1
Contents?: true
Size: 715 Bytes
Versions: 17
Compression:
Stored size: 715 Bytes
Contents
# frozen_string_literal: true require 'helper' class Nanoc::GemTest < Nanoc::TestCase def setup super FileUtils.cd(@orig_wd) end def test_build # Require clean environment Dir['nanoc-*.gem'].each { |f| FileUtils.rm(f) } # Build files_before = Set.new Dir['**/*'] stdout = StringIO.new stderr = StringIO.new piper = Nanoc::Extra::Piper.new(stdout: stdout, stderr: stderr) piper.run(%w[gem build nanoc.gemspec], nil) files_after = Set.new Dir['**/*'] # Check new files diff = files_after - files_before assert_equal 1, diff.size assert_match(/^nanoc-.*\.gem$/, diff.to_a[0]) ensure Dir['nanoc-*.gem'].each { |f| FileUtils.rm(f) } end end
Version data entries
17 entries across 17 versions & 1 rubygems