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 Rails test runner for Ruby on Rails projects #59

Merged
merged 1 commit into from Oct 23, 2020

Conversation

@amake
Copy link
Contributor

@amake amake commented Oct 20, 2020

I use ruby-test-mode with some Ruby on Rails projects and I find that the experience using the Rails test runner is superior to other runners. For instance

  • The other runners fail for some of my projects due to missing imports, while rails test works; this may be a configuration issue on my end, but it's hard to figure out
  • The -v flag with the Rails runner gives nice output that gives me a better idea of the progress of a long-running test suite

This PR adds the capability to use rails test for Rails projects.

@amake amake force-pushed the rails-test-runner branch from e77a5ec to 63a61a9 Oct 20, 2020
@amake amake force-pushed the rails-test-runner branch from 63a61a9 to f2f364d Oct 20, 2020
@amake
Copy link
Contributor Author

@amake amake commented Oct 20, 2020

The Emacs 26.3 CI failure seems unrelated to the content of the PR (it's failing to provision cask).

Loading

@icostan
Copy link
Member

@icostan icostan commented Oct 23, 2020

Yeah, that's true, something is wrong with cask and emacs-26 version, I am going to fix it this weekend. Merging the PR for now.

Loading

@icostan icostan merged commit 605947d into ruby-test-mode:master Oct 23, 2020
1 of 2 checks passed
Loading
@amake amake deleted the rails-test-runner branch Oct 27, 2020
@rtlong
Copy link

@rtlong rtlong commented Jan 26, 2021

I think this has broken my setup, where I use rspec with a Rails project. I normally do not use the rails test runner, instead I use the rspec executable directly. When I saw this change, I looked, hard, to find any docs on how to use the rails-test runner with Rspec, and either it's not supported or can't find how to do it. I don't see anywhere in the Rails source where that command would at some point defer to RSpec's logic. To work around this, I'm going to advise the ruby-test-rails-p func to return false. I'd love to understand how other folks are getting on with a similar setup; maybe it's just a configuration in Rails I'm missing or maybe this change is problematic for that workflow?

Loading

@amake
Copy link
Contributor Author

@amake amake commented Jan 27, 2021

@rtlong Sorry for the breakage. I thought the Rails runner would be smart, but I guess it's not.

Please see if #65 fixes it for you.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants