aboutsummaryrefslogtreecommitdiffstats
path: root/test/rubygems/test_gem_specification.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-26 02:06:00 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-26 02:06:00 +0000
commit8b424513fd43c398aaeea5dede8bbc5c51602773 (patch)
treeb1509d7a77a52206f7825520c99a693f7818a8a4 /test/rubygems/test_gem_specification.rb
parentdbf3fb3d8e6e10e2ac2af19937e0016a4815ca50 (diff)
downloadruby-8b424513fd43c398aaeea5dede8bbc5c51602773.tar.gz
Upgrade to RubyGems 1.2.0 r1824. Incorporates [ruby-core:17353].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rubygems/test_gem_specification.rb')
-rw-r--r--test/rubygems/test_gem_specification.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb
index 003ded7bc0..57c3fdc158 100644
--- a/test/rubygems/test_gem_specification.rb
+++ b/test/rubygems/test_gem_specification.rb
@@ -71,6 +71,8 @@ end
File.open File.join(@tempdir, 'bin', 'exec'), 'w' do |fp|
fp.puts "#!#{Gem.ruby}"
end
+
+ @current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
end
def test_self_attribute_names
@@ -112,6 +114,19 @@ end
assert_equal expected_value, actual_value
end
+ def test_self__load_future
+ spec = Gem::Specification.new
+ spec.name = 'a'
+ spec.version = '1'
+ spec.specification_version = @current_version + 1
+
+ new_spec = Marshal.load Marshal.dump(spec)
+
+ assert_equal 'a', new_spec.name
+ assert_equal Gem::Version.new(1), new_spec.version
+ assert_equal @current_version, new_spec.specification_version
+ end
+
def test_self_load
spec = File.join @gemhome, 'specifications', "#{@a2.full_name}.gemspec"
gs = Gem::Specification.load spec
@@ -689,7 +704,7 @@ end
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
- s.specification_version = 3
+ s.specification_version = 2
if current_version >= 3 then
s.add_runtime_dependency(%q<rake>, [\"> 0.4\"])