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

Run with spec directory by default for rspec-queue command #109

Merged

Conversation

koic
Copy link
Collaborator

@koic koic commented Mar 21, 2023

Before

Requrie a target target directory:

$ bundle exec test-queue spec

If the spec path is omitted, user might be surprised to see 0 test runs.

After

spec directory is target by default when target directory is ommited:

$ bundle exec test-queue

So, user can use it in the same abbreviated way as RSpec.

$ bundle exec rspec # spec directory by default target.

Note, however, that this PR implementation (i.e. @files_or_directories_to_run) is naive as it relies on: https://github.com/rspec/rspec-core/blob/v3.12.1/lib/rspec/core/configuration.rb#L1061-L1077

@koic koic force-pushed the run_with_spec_dir_by_default_for_rspec_queue branch 3 times, most recently from d343c5f to 95dc16a Compare April 5, 2023 07:32
…sing RSpec 3

## Before

Requrie a target target directory:

```console
$ bundle exec test-queue spec
```

If the `spec` path is omitted, user might be surprised to see 0 test runs.

## After

`spec` directory is target by default when target directory is ommited:

```console
$ bundle exec test-queue
```

So, user can use it in the same abbreviated way as RSpec.

```console
$ bundle exec rspec # spec directory by default target.
```

Note, however, that this PR implementation (i.e. `@files_or_directories_to_run`) is naive as it relies on:
https://github.com/rspec/rspec-core/blob/v3.12.1/lib/rspec/core/configuration.rb#L1061-L1077

Note, it does not support legacy RSpec 2.
So rspec.bats is copied to rspec2.bats and rspec3.bats, and adding new test case only to rspec3.bats.
@koic koic force-pushed the run_with_spec_dir_by_default_for_rspec_queue branch from 95dc16a to d42d97e Compare April 5, 2023 07:35
@koic koic merged commit b9950e8 into tmm1:master Apr 5, 2023
14 checks passed
@koic koic deleted the run_with_spec_dir_by_default_for_rspec_queue branch April 5, 2023 16:39
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

1 participant