diff options
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r-- | test/rubygems/test_gem_specification.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index f8b713c5c7..2ba2d5e20d 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -879,12 +879,23 @@ dependencies: [] def test_base_dir assert_equal @gemhome, @a1.base_dir + end + def test_base_dir_not_loaded @a1.instance_variable_set :@loaded_from, nil assert_equal Gem.dir, @a1.base_dir end + def test_base_dir_default + default_dir = + File.join Gem::Specification.default_specifications_dir, @a1.spec_name + + @a1.instance_variable_set :@loaded_from, default_dir + + assert_equal Gem.default_dir, @a1.base_dir + end + def test_lib_files @a1.files = %w[lib/foo.rb Rakefile] |