test/test_gem_specification.rb in rubygems-update-1.3.7 vs test/test_gem_specification.rb in rubygems-update-1.4.0

- old
+ new

@@ -775,11 +775,10 @@ s.require_paths = [\"lib\"] s.rubygems_version = %q{#{Gem::VERSION}} s.summary = %q{this is a summary} if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = #{Gem::Specification::CURRENT_SPECIFICATION_VERSION} if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q<b>, [\"= 1\"]) else @@ -830,11 +829,10 @@ s.rubygems_version = %q{#{Gem::VERSION}} s.summary = %q{this is a summary} s.test_files = [\"test/suite.rb\"] if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = 3 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then s.add_runtime_dependency(%q<rake>, [\"> 0.4\"]) s.add_runtime_dependency(%q<jabber4r>, [\"> 0.0.0\"]) @@ -1173,25 +1171,10 @@ @a1.platform = 'powerpc-darwin' assert @a1.validate end end - def test_validate_rubyforge_project - util_setup_validate - - Dir.chdir @tempdir do - @a1.rubyforge_project = '' - - use_ui @ui do - @a1.validate - end - - assert_equal "WARNING: no rubyforge_project specified\n", - @ui.error, 'error' - end - end - def test_validate_rubygems_version util_setup_validate @a1.rubygems_version = "3" e = assert_raises Gem::InvalidSpecificationException do @@ -1256,10 +1239,12 @@ def test_load_errors_contain_filename specfile = Tempfile.new(self.class.name.downcase) specfile.write "raise 'boom'" specfile.close begin - Gem::Specification.load(specfile.path) + capture_io do + Gem::Specification.load(specfile.path) + end rescue => e name_rexp = Regexp.new(Regexp.escape(specfile.path)) assert e.backtrace.grep(name_rexp).any? end ensure