diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-07 01:19:28 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-01-07 01:19:28 +0000 |
commit | d5e810dbd24cb92dc86d2d5b048f239315b15ba8 (patch) | |
tree | 0656ac1f6abe26dd1f1349f25ece23a534b1a0dc /test/rubygems/test_gem_specification.rb | |
parent | 738b8872ef871cbfd78730142049cd1fe94a95fa (diff) | |
download | ruby-d5e810dbd24cb92dc86d2d5b048f239315b15ba8.tar.gz |
* ChangeLog:
* lib/rubygems/basic_specification.rb (class Gem):
* lib/rubygems/commands/contents_command.rb (prefix or only the files that are requir):
* lib/rubygems/commands/install_command.rb (to write the specification by hand):
* lib/rubygems/commands/setup_command.rb (class Gem):
* lib/rubygems/commands/setup_command.rb (TEXT):
* lib/rubygems/compatibility.rb (module Gem):
* lib/rubygems/defaults.rb (module Gem):
* lib/rubygems/deprecate.rb (module Gem):
* lib/rubygems/installer.rb (class Gem):
* lib/rubygems/platform.rb (class Gem):
* lib/rubygems/rdoc.rb (class Gem):
* lib/rubygems/request_set/lockfile.rb (class Gem):
* lib/rubygems/resolver/installer_set.rb (class Gem):
* lib/rubygems/resolver.rb (class Gem):
* lib/rubygems/specification.rb (class Gem):
* lib/rubygems/test_case.rb (class Gem):
* lib/rubygems/test_case.rb (Also):
* lib/rubygems/uninstaller.rb (class Gem):
* lib/rubygems.rb (module Gem):
* test/rubygems/test_gem.rb (class TestGem):
* test/rubygems/test_gem_commands_contents_command.rb (lib):
* test/rubygems/test_gem_commands_environment_command.rb (class TestGemCommandsEnvironmentCommand):
* test/rubygems/test_gem_commands_install_command.rb (ERROR):
* test/rubygems/test_gem_commands_update_command.rb (class TestGemCommandsUpdateCommand):
* test/rubygems/test_gem_dependency_installer.rb (class TestGemDependencyInstaller):
* test/rubygems/test_gem_installer.rb (load Gem):
* test/rubygems/test_gem_installer.rb (gem):
* test/rubygems/test_gem_request_set_lockfile.rb (GEM):
* test/rubygems/test_gem_request_set_lockfile.rb (DEPENDENCIES):
* test/rubygems/test_gem_specification.rb (dependencies):
* test/rubygems/test_gem_specification.rb (duplicate dependency on b):
* test/rubygems/test_gem_uninstaller.rb (class TestGemUninstaller):
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 50 |
1 files changed, 45 insertions, 5 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 7aa9d5aeb1..b72a5d1baf 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -999,8 +999,8 @@ dependencies: [] assert_equal 'summary', spec.summary assert_same spec.summary, new_spec.summary - assert_equal %w[lib/file.rb test/file.rb bin/exec README.txt - ext/extconf.rb].sort, + assert_equal %w[README.txt bin/exec ext/extconf.rb lib/file.rb + test/file.rb].sort, spec.files refute_same spec.files, new_spec.files, 'files' @@ -1109,7 +1109,31 @@ dependencies: [] @a2.executable = 'app' assert_equal nil, @a2.bindir - assert_equal %w[lib/code.rb app].sort, @a2.files + assert_equal %w[app lib/code.rb].sort, @a2.files + end + + def test_extensions_equals_nil + @a2.instance_variable_set(:@extensions, nil) + assert_equal nil, @a2.instance_variable_get(:@extensions) + assert_equal %w[lib/code.rb], @a2.files + end + + def test_test_files_equals_nil + @a2.instance_variable_set(:@test_files, nil) + assert_equal nil, @a2.instance_variable_get(:@test_files) + assert_equal %w[lib/code.rb], @a2.files + end + + def test_executables_equals_nil + @a2.instance_variable_set(:@executables, nil) + assert_equal nil, @a2.instance_variable_get(:@executables) + assert_equal %w[lib/code.rb], @a2.files + end + + def test_extra_rdoc_files_equals_nil + @a2.instance_variable_set(:@extra_rdoc_files, nil) + assert_equal nil, @a2.instance_variable_get(:@extra_rdoc_files) + assert_equal %w[lib/code.rb], @a2.files end def test_build_extensions @@ -1437,7 +1461,7 @@ dependencies: [] def test_executable_equals @a2.executable = 'app' assert_equal 'app', @a2.executable - assert_equal %w[lib/code.rb bin/app].sort, @a2.files + assert_equal %w[bin/app lib/code.rb].sort, @a2.files end def test_extensions @@ -1785,6 +1809,22 @@ dependencies: [] assert_kind_of Gem::Source::Installed, @a1.source end + def test_source_paths + ext_spec + + @ext.require_paths = %w[lib ext foo] + @ext.extensions << 'bar/baz' + + expected = %w[ + lib + ext + foo + bar + ] + + assert_equal expected, @ext.source_paths + end + def test_full_require_paths ext_spec @@ -2435,7 +2475,7 @@ duplicate dependency on b (>= 1.2.3), (~> 1.2) use: assert_equal '["lib2"] are not files', e.message end - assert_equal %w[lib/code.rb test/suite.rb bin/exec ext/a/extconf.rb lib2].sort, + assert_equal %w[bin/exec ext/a/extconf.rb lib/code.rb lib2 test/suite.rb].sort, @a1.files end |