File tree 9 files changed +20
-19
lines changed
9 files changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,4 @@ source 'http://gemcutter.org'
3
3
group :test do
4
4
gem 'test_declarative'
5
5
gem 'mocha'
6
- gem 'minitest'
7
6
end
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ Gem::Specification.new do |s|
17
17
s . platform = Gem ::Platform ::RUBY
18
18
s . rubyforge_project = '[none]'
19
19
20
- s . add_development_dependency 'minitest' , '>=1.6.0'
21
20
s . add_development_dependency 'test_declarative' , '>=0.0.2'
22
21
s . add_development_dependency 'mocha' , '>=0.9.8'
23
22
Original file line number Diff line number Diff line change 4
4
require 'gem_release/gemspec'
5
5
require 'fileutils'
6
6
7
- class BootstrapCommandTest < MiniTest ::Unit ::TestCase
7
+ class BootstrapCommandTest < Test ::Unit ::TestCase
8
8
def setup
9
9
build_sandbox
10
10
stub_command ( GemspecCommand , :execute )
Original file line number Diff line number Diff line change 3
3
require 'rubygems/commands/bootstrap_command'
4
4
require 'rubygems/commands/gemspec_command'
5
5
6
- class GemspecCommandTest < MiniTest ::Unit ::TestCase
6
+ class GemspecCommandTest < Test ::Unit ::TestCase
7
7
def setup
8
8
build_sandbox
9
9
stub_command ( GemspecCommand , :say )
Original file line number Diff line number Diff line change 3
3
require 'gem_release/version'
4
4
require 'gem_release/gemspec'
5
5
6
- class GemspecTest < MiniTest ::Unit ::TestCase
6
+ class GemspecTest < Test ::Unit ::TestCase
7
7
include Gem ::Commands
8
8
9
9
test 'scaffolds a gemspec with default values' do
@@ -24,15 +24,20 @@ class GemspecTest < MiniTest::Unit::TestCase
24
24
assert_equal '[description]' , gemspec . description
25
25
26
26
assert_match %r(require 'gem_release/version') , source
27
-
28
- assert_match %r(files\s *=[^$]*git ls\- files) , source
27
+ assert_match %r(files\s *=\s *Dir.glob\( \" lib\/ \* \* \/ \* \* \" \) ) , source
29
28
end
30
29
31
30
test 'scaffolds a gemspec with glob strategy' do
32
31
source = GemRelease ::Gemspec . new ( :strategy => 'glob' ) . render
33
32
gemspec = eval ( source )
34
33
assert_match %r(files\s *=\s *Dir.glob\( \" lib\/ \* \* \/ \* \* \" \) ) , source
35
34
end
35
+
36
+ test 'scaffolds a gemspec with git strategy' do
37
+ source = GemRelease ::Gemspec . new ( :strategy => 'git' ) . render
38
+ gemspec = eval ( source )
39
+ assert_match %r(files\s *=[^$]*git ls\- files) , source
40
+ end
36
41
37
42
test 'filename' do
38
43
assert_equal 'gem-release.gemspec' , GemRelease ::Gemspec . new . filename
Original file line number Diff line number Diff line change 2
2
3
3
require 'rubygems/commands/release_command'
4
4
5
- class HelpersTest < MiniTest ::Unit ::TestCase
5
+ class HelpersTest < Test ::Unit ::TestCase
6
6
include Gem ::Commands
7
7
8
8
test "gems_filename" do
Original file line number Diff line number Diff line change 3
3
require 'rubygems/commands/release_command'
4
4
require 'gem_release/version'
5
5
6
- class ReleaseCommandTest < MiniTest ::Unit ::TestCase
6
+ class ReleaseCommandTest < Test ::Unit ::TestCase
7
7
include Gem ::Commands
8
8
9
9
def setup
Original file line number Diff line number Diff line change 2
2
3
3
require 'rubygems/commands/tag_command'
4
4
5
- class TagCommandTest < MiniTest ::Unit ::TestCase
5
+ class TagCommandTest < Test ::Unit ::TestCase
6
6
include Gem ::Commands
7
7
8
8
def setup
Original file line number Diff line number Diff line change 1
1
$: << File . expand_path ( '../../lib' , __FILE__ )
2
2
3
- require 'minitest/unit'
4
- require 'test_declarative'
5
- require 'mocha'
6
-
7
3
require 'rubygems'
8
4
require 'rubygems_plugin'
9
5
10
- MiniTest ::Unit . autorun
6
+ require 'test/unit'
7
+ require 'test_declarative'
8
+ require 'mocha'
11
9
12
- class MiniTest ::Unit ::TestCase
10
+ class Test ::Unit ::TestCase
13
11
include Gem ::Commands
14
12
15
13
def build_sandbox
16
14
@cwd = Dir . pwd
17
- FileUtils . mkdir_p ( 'tmp/foo-bar' )
18
- Dir . chdir ( 'tmp/foo-bar' )
15
+ FileUtils . mkdir_p ( 'tmp/gem-release-test/ foo-bar' )
16
+ Dir . chdir ( 'tmp/gem-release-test/ foo-bar' )
19
17
end
20
18
21
19
def teardown_sandbox
22
20
Dir . chdir ( @cwd )
23
- FileUtils . rm_r ( 'tmp/foo-bar' )
21
+ FileUtils . rm_r ( 'tmp/gem-release-test/ foo-bar' )
24
22
end
25
23
26
24
def stub_command ( command_class , *methods )
You can’t perform that action at this time.
0 commit comments