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

Version Path
nanoc-4.8.11 test/test_gem.rb
nanoc-4.8.10 test/test_gem.rb
nanoc-4.8.9 test/test_gem.rb
nanoc-4.8.8 test/test_gem.rb
nanoc-4.8.7 test/test_gem.rb
nanoc-4.8.6 test/test_gem.rb
nanoc-4.8.5 test/test_gem.rb
nanoc-4.8.4 test/test_gem.rb
nanoc-4.8.3 test/test_gem.rb
nanoc-4.8.2 test/test_gem.rb
nanoc-4.8.1 test/test_gem.rb
nanoc-4.8.0 test/test_gem.rb
nanoc-4.7.14 test/test_gem.rb
nanoc-4.7.13 test/test_gem.rb
nanoc-4.7.12 test/test_gem.rb
nanoc-4.7.11 test/test_gem.rb
nanoc-4.7.10 test/test_gem.rb