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

use our own runner for Rails framework components bin/test #20480

Merged
merged 4 commits into from
Jun 12, 2015

Conversation

senny
Copy link
Member

@senny senny commented Jun 8, 2015

The minitest plugin for Rails 5 has some fantastic improvements. Would be nice to have it's features available in Rails itself.

This is a quick proof of concept to integrate the runner. The components Active Record, Railties and Active Job have been skipped for now because they rely on additional setup performed in the Rake tasks.

Interested to hear your thoughts.

@senny
Copy link
Member Author

senny commented Jun 8, 2015

/cc @arthurnn @kaspth @rafaelfranca

@rafaelfranca
Copy link
Member

LGTM

@rafaelfranca
Copy link
Member

Are we going to use them on the travis setup too?

@kaspth
Copy link
Contributor

kaspth commented Jun 8, 2015

LGTM too. Are you planning to add the Active Record etc. runners here or in another pr?

@arthurnn
Copy link
Member

arthurnn commented Jun 8, 2015

LGTM

@senny
Copy link
Member Author

senny commented Jun 11, 2015

@kaspth I'll investigate adding the runner to AR.

The most obvious problem at the moment is that bin/test would run every test including the ones for specific adapters. Of course MySQL tests won't work very well with SQLite. I'm inclined to guard these adapter specific tests with if current adapter = ADAPTER to ensure they only run when necessary. I think we do that in some cases already.

As far as I can see things are more complicated for Railties and Active Job.

This makes it possible to easily get the runner working with existing
setups that rely on `active_support/testing/autorun.rb`.
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.
@senny
Copy link
Member Author

senny commented Jun 11, 2015

@rafaelfranca what do you think about changing all the superclasses to get it working with bin/test? If that's fine we should be able to :shipit:.

senny added a commit that referenced this pull request Jun 12, 2015
use our own runner for Rails framework components `bin/test`
@senny senny merged commit 1d43458 into rails:master Jun 12, 2015
@senny senny deleted the test_runner branch June 12, 2015 15:19
@kaspth
Copy link
Contributor

kaspth commented Jun 12, 2015

Very cool! 😄

Kasper

On 12. jun. 2015 17.20 +0200, Yves Sennnotifications@github.com, wrote:

Merged#20480(#20480).


Reply to this email directly orview it on GitHub(#20480 (comment)).

yhirano55 added a commit to yhirano55/rails that referenced this pull request Apr 3, 2018
* Since rails#20480, it come to be used `bin/test`.
* For newbies, bin/test is easier to understand than rake task.
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

Successfully merging this pull request may close these issues.

None yet

4 participants