File: dh_make_ruby_integration_test.rb

package info (click to toggle)
gem2deb 2.2.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,228 kB
  • sloc: ruby: 5,562; sh: 140; perl: 46; ansic: 33; makefile: 31
file content (31 lines) | stat: -rw-r--r-- 931 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
require_relative '../test_helper'

class DhMakeRubyIntegrationTest < Gem2DebTestCase

  should 'run dh-make against directory with gemspec' do
    target_dir = File.join(tmpdir, 'withgemspec')
    FileUtils.cp_r(SIMPLE_GIT, target_dir)
    run_command("dh-make-ruby #{target_dir}")
  end

  should 'run dh-make against directory without gemspec' do
    target_dir = File.join(tmpdir, 'withoutgemspec')
    FileUtils.cp_r(SIMPLE_GIT, target_dir)
    FileUtils.rm(File.join(target_dir, 'simplegit.gemspec'))
    run_command("dh-make-ruby #{target_dir}")
  end

  should 'be idempotent with --overwrite' do
    target_dir = File.join(tmpdir, 'pkg')
    FileUtils.cp_r(SIMPLE_GIT, target_dir)

    run_command("dh-make-ruby #{target_dir}")
    FileUtils.cp_r(target_dir, target_dir + '.old')

    run_command("dh-make-ruby --overwrite #{target_dir}")

    assert_equal '', `diff -Nru #{target_dir}.old #{target_dir}`.strip
  end

end