Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly require test_unit/reporter #30517

Merged
merged 1 commit into from
Sep 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
Minitest.backtrace_filter = Minitest::BacktraceFilter.new

<% unless engine? -%>
require "rails/test_unit/reporter"
Rails::TestUnitReporter.executable = 'bin/test'
<% end -%>

Expand Down
6 changes: 6 additions & 0 deletions railties/test/generators/plugin_test_runner_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ def test_warnings
capture(:stderr) { run_test_command("test/models/warnings_test.rb -w") })
end

def test_run_rake_test
create_test_file "foo"
result = Dir.chdir(plugin_path) { `rake test TEST=test/foo_test.rb` }
assert_match "1 runs, 1 assertions, 0 failures", result
end

private
def plugin_path
"#{@destination_root}/bukkits"
Expand Down