From 2d9370405c5e77a5a9c57d73d773416c793c31cc Mon Sep 17 00:00:00 2001 From: Ryan Davis Date: Sat, 6 Mar 2010 03:08:33 -0800 Subject: + Cleaned up dep tests [git-p4: depot-paths = "//src/hoe/dev/": change = 5691] --- test/test_hoe.rb | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/test/test_hoe.rb b/test/test_hoe.rb index 6efba90..a64785f 100644 --- a/test/test_hoe.rb +++ b/test/test_hoe.rb @@ -53,23 +53,12 @@ class TestHoe < MiniTest::Unit::TestCase deps = spec.dependencies.sort_by { |dep| dep.name } - assert_equal %w(gemcutter hoe rubyforge), deps.map { |dep| dep.name } + expected = [["hoe", :development, ">= #{Hoe::VERSION}"], + ["rubyforge", :development, ">= #{::RubyForge::VERSION}"]] - dep = deps.shift - assert_equal 'gemcutter', dep.name - assert_equal :development, dep.type - version = Gem.loaded_specs['gemcutter'].version - assert_equal ">= #{version}", dep.version_requirements.to_s - - dep = deps.shift - assert_equal 'hoe', dep.name - assert_equal :development, dep.type - assert_equal ">= #{Hoe::VERSION}", dep.version_requirements.to_s - - dep = deps.shift - assert_equal 'rubyforge', dep.name - assert_equal :development, dep.type - assert_equal ">= #{::RubyForge::VERSION}", dep.version_requirements.to_s + assert_equal expected, deps.map { |dep| + [dep.name, dep.type, dep.requirement.to_s] + } end def test_plugins -- cgit v1.2.1