Sha256: a1814a79b4715fa2bcd852fccae9b41038a44eeac029220330fd7668d2b23391

Contents?: true

Size: 684 Bytes

Versions: 18

Compression:

Stored size: 684 Bytes

Contents

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

18 entries across 18 versions & 1 rubygems

Version Path
nanoc-4.7.5 test/test_gem.rb
nanoc-4.7.4 test/test_gem.rb
nanoc-4.7.3 test/test_gem.rb
nanoc-4.7.2 test/test_gem.rb
nanoc-4.7.1 test/test_gem.rb
nanoc-4.7.0 test/test_gem.rb
nanoc-4.6.4 test/test_gem.rb
nanoc-4.6.3 test/test_gem.rb
nanoc-4.6.2 test/test_gem.rb
nanoc-4.6.1 test/test_gem.rb
nanoc-4.6.0 test/test_gem.rb
nanoc-4.5.4 test/test_gem.rb
nanoc-4.5.3 test/test_gem.rb
nanoc-4.5.2 test/test_gem.rb
nanoc-4.5.1 test/test_gem.rb
nanoc-4.5.0 test/test_gem.rb
nanoc-4.4.7 test/test_gem.rb
nanoc-4.4.6 test/test_gem.rb