Skip to content

Commit

Permalink
use our runner (bin/test) for framework components.
Browse files Browse the repository at this point in the history
This adds a script `bin/test` to most Rails framework components. The
script uses the rails minitest plugin to augment the runner.
See rails#19571 for details about the
plugin.

I did not yet add `bin/test` for activerecord, activejob and railties.
These components rely on specific setup performed in the rake-tasks.
  • Loading branch information
senny committed Jun 11, 2015
1 parent eec9327 commit 54d84cb
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions actionmailer/bin/test
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
require File.expand_path("../tools/test", COMPONENT_ROOT)
3 changes: 3 additions & 0 deletions actionpack/bin/test
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
require File.expand_path("../tools/test", COMPONENT_ROOT)
3 changes: 3 additions & 0 deletions actionview/bin/test
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
require File.expand_path("../tools/test", COMPONENT_ROOT)
3 changes: 3 additions & 0 deletions activemodel/bin/test
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
require File.expand_path("../tools/test", COMPONENT_ROOT)
3 changes: 3 additions & 0 deletions activesupport/bin/test
@@ -0,0 +1,3 @@
#!/usr/bin/env ruby
COMPONENT_ROOT = File.expand_path("../../", __FILE__)
require File.expand_path("../tools/test", COMPONENT_ROOT)
12 changes: 12 additions & 0 deletions tools/test.rb
@@ -0,0 +1,12 @@
$: << File.expand_path("test", COMPONENT_ROOT)
require File.expand_path("../../load_paths", __FILE__)
require "rails/test_unit/minitest_plugin"

module Rails
# Necessary to get rerun-snippts working.
def self.root
@root ||= Pathname.new(COMPONENT_ROOT)
end
end

exit Minitest.run(ARGV)

0 comments on commit 54d84cb

Please sign in to comment.