forked from svenfuchs/gem-release
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chris flöß
committed
Nov 22, 2010
1 parent
5190753
commit 0c8fbae
Showing
4 changed files
with
69 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
require 'pathname' | ||
require 'rubygems' | ||
require 'ruby-debug' | ||
|
||
require File.expand_path('../../test_helper', __FILE__) | ||
$: << File.expand_path('../../../lib', __FILE__) | ||
|
||
require 'rubygems/commands/bump_command' | ||
require 'rubygems/commands/bootstrap_command' | ||
require 'rubygems/commands/release_command' | ||
|
||
class TestRecurse < Test::Unit::TestCase | ||
def setup | ||
@cwd=Dir.pwd | ||
@recursive_specs=['tmp/gem-release-test/repo/', | ||
'tmp/gem-release-test/repo/spec1', | ||
'tmp/gem-release-test/repo/spec2', | ||
'tmp/gem-release-test/repo/spec3', | ||
'tmp/gem-release-test/repo/spec3/spec4'] | ||
@recursive_specs.each do |dir| | ||
project = dir.split('/').last | ||
FileUtils.mkdir_p(dir) | ||
Dir.chdir(dir) | ||
bs = BootstrapCommand.new | ||
bs.send(:write_scaffold) | ||
bs.send(:write_gemspec) | ||
FileUtils.touch("#{project}.gemspec") | ||
Dir.chdir(@cwd) | ||
end | ||
|
||
@bump_command=klass.new | ||
|
||
Dir.chdir('tmp/gem-release-test/repo') | ||
end | ||
|
||
def teardown | ||
Dir.chdir(@cwd) | ||
FileUtils.rm_rf('tmp') | ||
end | ||
|
||
test "truth" do | ||
assert true | ||
end | ||
|
||
test "can instantiate bump command" do | ||
assert defined?(Gem::Commands::ReleaseCommand) | ||
assert_kind_of ReleaseCommand, klass.new | ||
end | ||
|
||
protected | ||
def klass | ||
Gem::Commands::ReleaseCommand | ||
end | ||
|
||
def specs | ||
['repo.gemspec', 'spec1/spec1.gemspec', 'spec2/spec2.gemspec', | ||
'spec3/spec3.gemspec', 'spec3/spec4/spec4.gemspec'] | ||
end | ||
end |