blob: d8b5140070363053ca90798d2c44daeaa6e6f9d6 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
require "rubygems"
require "minitest/autorun"
require "hoe"
class TestHoePublish < Minitest::Test
def setup
@hoe = Hoe.spec "blah" do
self.version = "1.0"
developer "author", ""
license "MIT"
end
end
make_my_diffs_pretty!
def linux? platform = RUBY_PLATFORM # TODO: push up to minitest?
/linux/ =~ platform
end
def test_make_rdoc_cmd
rdoc = Gem.bin_wrapper "rdoc"
unless File.exist? rdoc then
extra = "-S"
rdoc = "rdoc"
end
expected = %W[
#{Gem.ruby}
#{rdoc}
--title blah-1.0\ Documentation
-o doc
--main README.rdoc
lib
History.rdoc Manifest.txt README.rdoc
]
expected[1, 0] = extra if extra
# skip if linux?
capture_io do
assert_equal expected, @hoe.make_rdoc_cmd
end
end
end
|