aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/test/test_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/commands/test/test_command.rb')
-rw-r--r--railties/lib/rails/commands/test/test_command.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/railties/lib/rails/commands/test/test_command.rb b/railties/lib/rails/commands/test/test_command.rb
new file mode 100644
index 0000000000..7bf8f61137
--- /dev/null
+++ b/railties/lib/rails/commands/test/test_command.rb
@@ -0,0 +1,20 @@
+require "rails/command"
+require "rails/test_unit/minitest_plugin"
+
+module Rails
+ module Command
+ class TestCommand < Base # :nodoc:
+ def help
+ perform # Hand over help printing to minitest.
+ end
+
+ def perform(*)
+ $LOAD_PATH << Rails::Command.root.join("test")
+
+ Minitest.run_via[:rails] = true
+
+ require "active_support/testing/autorun"
+ end
+ end
+ end
+end