Skip to content
Browse files

Add Hoe

Let's see if this entices those crafty seattle.rb guys to contribute...
  • Loading branch information...
1 parent bc27a47 commit 461a252030d14109ceeb264744129fe5a79dde77 @blowmage committed May 25, 2011
Showing with 98 additions and 43 deletions.
  1. +23 −0 .autotest
  2. +1 −0 .gitignore
  3. +5 −0 CHANGELOG.rdoc
  4. +29 −0 Manifest.txt
  5. +4 −8 README.md → README.rdoc
  6. +27 −0 Rakefile
  7. +1 −0 lib/minitest-rails.rb
  8. +0 −5 lib/minitest/rails/version.rb
  9. +0 −30 minitest-rails.gemspec
  10. +8 −0 test/test_minitest.rb
View
23 .autotest
@@ -0,0 +1,23 @@
+# -*- ruby -*-
+
+require 'autotest/restart'
+
+# Autotest.add_hook :initialize do |at|
+# at.extra_files << "../some/external/dependency.rb"
+#
+# at.libs << ":../some/external"
+#
+# at.add_exception 'vendor'
+#
+# at.add_mapping(/dependency.rb/) do |f, _|
+# at.files_matching(/test_.*rb$/)
+# end
+#
+# %w(TestA TestB).each do |klass|
+# at.extra_class_map[klass] = "test/test_misc.rb"
+# end
+# end
+
+# Autotest.add_hook :run_command do |at|
+# system "rake build"
+# end
View
1 .gitignore
@@ -0,0 +1 @@
+pkg
View
5 CHANGELOG.rdoc
@@ -0,0 +1,5 @@
+=== 0.0.1 / 2011-05-24
+
+* 1 major enhancement
+
+ * Hello world!
View
29 Manifest.txt
@@ -0,0 +1,29 @@
+.autotest
+CHANGELOG.rdoc
+Manifest.txt
+README.rdoc
+Rakefile
+lib/generators/minitest.rb
+lib/generators/minitest/controller/controller_generator.rb
+lib/generators/minitest/controller/templates/functional_test.rb
+lib/generators/minitest/helper/helper_generator.rb
+lib/generators/minitest/helper/templates/helper_test.rb
+lib/generators/minitest/integration/integration_generator.rb
+lib/generators/minitest/integration/templates/integration_test.rb
+lib/generators/minitest/mailer/mailer_generator.rb
+lib/generators/minitest/mailer/templates/functional_test.rb
+lib/generators/minitest/model/model_generator.rb
+lib/generators/minitest/model/templates/fixtures.yml
+lib/generators/minitest/model/templates/model_test.rb
+lib/generators/minitest/observer/observer_generator.rb
+lib/generators/minitest/observer/templates/unit_test.rb
+lib/generators/minitest/performance/performance_generator.rb
+lib/generators/minitest/performance/templates/performance_test.rb
+lib/generators/minitest/plugin/plugin_generator.rb
+lib/generators/minitest/plugin/templates/%file_name%_test.rb.tt
+lib/generators/minitest/plugin/templates/test_helper.rb
+lib/generators/minitest/scaffold/scaffold_generator.rb
+lib/generators/minitest/scaffold/templates/functional_test.rb
+lib/minitest-rails.rb
+lib/minitest/rails/tasks/minitest.rake
+test/test_minitest.rb
View
12 README.md → README.rdoc
@@ -1,19 +1,16 @@
-minitest-rails
-==============
+= minitest-rails
MiniTest integration for Rails 3.1.
-Install
-------
+== Install
gem install minitest-rails
This installs the following gems:
minitest
-Configure
----------
+== Configure
Create a new rails app without Test::Unit:
@@ -40,8 +37,7 @@ Now you can add the test directory and default helpers by running the following:
This adds the spec directory and some skeleton files, including
the "rake spec" task.
-Usage
------
+== Usage
We aim to expose MiniTest with minimal changes for testing within Rails.
You can either create test classes that inherit from MiniTest::Unit::TestCase or you can use the MiniTest::Spec DSL.
View
27 Rakefile
@@ -0,0 +1,27 @@
+# -*- ruby -*-
+
+require 'rubygems'
+require 'hoe'
+
+Hoe.plugin :git
+Hoe.plugins.delete :rubyforge
+
+Hoe.spec 'minitest-rails' do
+ developer 'Mike Moore', 'mike@blowmage.com'
+
+ self.summary = 'MiniTest integration for Rails 3.1.'
+ self.description = 'Adds MiniTest as the default testing library in Rails. Also adds a bit of sanity with how tests are organized.'
+ self.url = 'http://blowmage.com/minitest-rails'
+
+ self.history_file = "CHANGELOG.rdoc"
+ self.readme_file = "README.rdoc"
+ self.testlib = :minitest
+
+ extra_deps << ['minitest', '~> 2.0']
+ extra_deps << ['rails', '~> 3.0']
+ # extra_deps << 'railties', '~> 3.0'
+ # extra_deps << 'activesupport', '~> 3.0'
+ # extra_deps << 'actionpack', '~> 3.0'
+end
+
+# vim: syntax=ruby
View
1 lib/minitest-rails.rb
@@ -7,6 +7,7 @@
module MiniTest
module Rails
+ VERSION = '0.0.1'
class Railtie < ::Rails::Railtie
config.app_generators.integration_tool :minitest
config.app_generators.test_framework :minitest
View
5 lib/minitest/rails/version.rb
@@ -1,5 +0,0 @@
-module MiniTest
- module Rails
- VERSION = '0.0.1'
- end
-end
View
30 minitest-rails.gemspec
@@ -1,30 +0,0 @@
-# -*- encoding: utf-8 -*-
-require 'rake'
-$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
-require 'minitest/rails/version'
-
-Gem::Specification.new do |s|
- s.name = 'minitest-rails'
- s.version = MiniTest::Rails::VERSION
- s.platform = Gem::Platform::RUBY
- s.authors = ['Mike Moore']
- s.email = 'mike@blowmage.com'
- s.homepage = 'http://github.com/blowmage/minitest-rails'
- s.summary = 'minitest-rails-#{MiniTest::Rails::VERSION}'
- s.description = 'MiniTest integration for Rails 3.1.'
-
- s.required_ruby_version = '>= 1.8.7'
- s.required_rubygems_version = ">= 1.3.6"
-
- s.files = FileList['lib/**/*', '[A-Z]*', 'test/**/*'].to_a
- s.test_files = FileList['test/**/*'].to_a
- s.extra_rdoc_files = ['README.md']
- s.rdoc_options = ['--charset=UTF-8']
- s.require_path = 'lib'
-
- s.add_runtime_dependency('minitest', ['~> 2.0'])
- s.add_runtime_dependency('activesupport', ['~> 3.0'])
- s.add_runtime_dependency('actionpack', ['~> 3.0'])
- s.add_runtime_dependency('railties', ['~> 3.0'])
-end
-
View
8 test/test_minitest.rb
@@ -0,0 +1,8 @@
+require "minitest/autorun"
+require "minitest-rails"
+
+class TestMiniTest < MiniTest::Unit::TestCase
+ def test_sanity
+ flunk "It burns!"
+ end
+end

0 comments on commit 461a252

Please sign in to comment.
Something went wrong with that request. Please try again.