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

Split spec files into examples programmatically #6

Open
agis opened this issue Jul 10, 2020 · 0 comments
Open

Split spec files into examples programmatically #6

agis opened this issue Jul 10, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@agis
Copy link
Collaborator

agis commented Jul 10, 2020

Right now we resort to shelling out and executing rspec in another process:

cmd = "DISABLE_SPRING=1 bin/rspec --dry-run --format json #{files.join(' ')}"

This is less than ideal since each project might have its own convention of calling into rspec (binstub, bundle exec or others). We should instead do this programmatically like we already do with the other aspects of the worker. I suspect we can call straight into RSpec::Core::Runner and pass the correct arguments (--dry-run etc.)

@agis agis added the enhancement New feature or request label Jul 10, 2020
agis added a commit that referenced this issue Aug 3, 2020
Usually RSpec prints errors to stderr, so we have to grab it too in
order to display a helpful error message in case this command fails.

Ideally we'd do this with popen3, but this is good enough for now,
considering #6.
agis added a commit that referenced this issue Aug 3, 2020
Usually RSpec prints errors to stderr, so we have to grab it too in
order to display a helpful error message in case this command fails.

Ideally we'd do this with popen3, but this is good enough for now,
considering #6.
agis added a commit that referenced this issue Aug 4, 2020
Usually RSpec prints errors to stderr, so we have to grab it too in
order to display a helpful error message in case this command fails.

Ideally we'd do this with popen3, but this is good enough for now,
considering #6.
agis added a commit that referenced this issue Aug 5, 2020
Usually RSpec prints errors to stderr, so we have to grab it too in
order to display a helpful error message in case this command fails.

Ideally we'd do this with popen3, but this is good enough for now,
considering #6.
agis added a commit that referenced this issue Aug 8, 2020
Usually RSpec prints errors to stderr, so we have to grab it too in
order to display a helpful error message in case this command fails.

Ideally we'd do this with popen3, but this is good enough for now,
considering #6.
agis added a commit that referenced this issue Aug 8, 2020
Usually RSpec prints errors to stderr, so we have to grab it too in
order to display a helpful error message in case this command fails.

Ideally we'd do this with popen3, but this is good enough for now,
considering #6.
@agis agis changed the title Split spec files into examples programatically Split spec files into examples programmatically Sep 8, 2020
agis added a commit that referenced this issue Sep 20, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
arguably faster and more robust.

Closes #6
agis added a commit that referenced this issue Sep 21, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
arguably faster and more robust.

Closes #6
agis added a commit that referenced this issue Sep 21, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
arguably faster and more robust.

Closes #6
agis added a commit that referenced this issue Sep 21, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
faster and more robust, since we avoid common shell shenanigans.

Closes #6
agis added a commit that referenced this issue Sep 21, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
faster and more robust, since we avoid common shell shenanigans.

Closes #6
agis added a commit that referenced this issue Sep 21, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
faster and more robust, since we avoid common shell shenanigans.

Closes #6
agis added a commit that referenced this issue Sep 21, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
faster and more robust, since we avoid common shell shenanigans.

Closes #6
agis added a commit that referenced this issue Oct 11, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
faster and more robust, since we avoid common shell shenanigans.

Closes #6
agis added a commit that referenced this issue Oct 16, 2020
Instead of shelling out to rspec, we now split spec files into
individual examples programmatically, using the RSpec Core API. This is
faster and more robust, since we avoid common shell shenanigans.

Closes #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant