test/test_hoe.rb in hoe-2.1.0 vs test/test_hoe.rb in hoe-2.2.0

- old
+ new

@@ -6,65 +6,10 @@ class TestHoe < MiniTest::Unit::TestCase def setup Rake.application.clear end - ## - # Yes, these tests suck, but it is damn hard to test this since - # everything is forked out. - - def test_basics - boring = %w(clobber_docs - clobber_package - clobber_rcov - gem - redocs - repackage) - expected = %w(audit - announce - check_extra_deps - check_manifest - clean - config_hoe - debug_gem - default - deps:email - deps:fetch - deps:list - docs - email - generate_key - install_gem - multi - package - post_blog - post_news - publish_docs - rcov - release - release_sanity - release_to_rubyforge - ridocs - test - test_deps) - expected += boring - - spec = Hoe.spec('blah') do - self.version = '1.0.0' - developer("name", "email") - end - - assert_equal ["name"], spec.author - assert_equal ["email"], spec.email - - tasks = Rake.application.tasks - public_tasks = tasks.reject { |t| t.comment.nil? }.map { |t| t.name }.sort - public_tasks -= %w(flay flog) - - assert_equal expected.sort, public_tasks - end - def test_possibly_better t = Gem::Specification::TODAY hoe = Hoe.spec("blah") do self.version = '1.2.3' developer 'author', 'email' @@ -104,9 +49,18 @@ dep = deps.first assert_equal 'hoe', dep.name assert_equal :development, dep.type assert_equal ">= #{Hoe::VERSION}", dep.version_requirements.to_s + end + + def test_plugins + before = Hoe.plugins.dup + Hoe.plugin :first, :second + assert_equal before + [:first, :second], Hoe.plugins + ensure + # FIX: maybe add Hoe.reset + Hoe.plugins.replace before end def test_rename # project, file_name, klass = Hoe.normalize_names 'project_name'