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

Rails 5.1.3 error running tests for new plugin #30516

Closed
fdel15 opened this issue Sep 3, 2017 · 0 comments
Closed

Rails 5.1.3 error running tests for new plugin #30516

fdel15 opened this issue Sep 3, 2017 · 0 comments

Comments

@fdel15
Copy link

fdel15 commented Sep 3, 2017

Steps to reproduce

  1. Create new Rails plugin rails plugin new example_plugin

  2. Validate gemspec by removing "TODO"

  3. Run generated test rake test

Expected behavior

I expect there to be 1 passing test that asserts the plugin defined a module with the same name.

Actual behavior

You get an error

uninitialized constant Rails::TestUnitReporter (NameError)

in

{plugin_name}/test/test_helper.rb

System configuration

Rails version:
5.1.3

Ruby version:
2.4.1

I confirmed that we do not get this error in Rails 5.1.2

I believe it was introduced in pull request 29572

y-yagi added a commit to y-yagi/rails that referenced this issue Sep 3, 2017
If the user used the `bin/test` to execute the test, this file is
automatically loaded, so require is unnecessary.
https://github.com/rails/rails/blob/acea68de026ba657cb65c4dd0fc1f24ba67e1cf8/railties/lib/rails/plugin/test.rb#L4

However, when using `rake test`, an explicit require is required because
the above file is not loaded.

Fixes rails#30516
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant