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

Include TestHelper and AssertionHelper in the gem #155

Closed
alex4787 opened this issue Nov 12, 2021 · 0 comments · Fixed by #156
Closed

Include TestHelper and AssertionHelper in the gem #155

alex4787 opened this issue Nov 12, 2021 · 0 comments · Fixed by #156
Assignees
Labels
enhancement New feature or request

Comments

@alex4787
Copy link

alex4787 commented Nov 12, 2021

Is your feature request related to a problem? Please describe.

Within the main Shopify repo, we have several custom cops we'd like to create tests for with Minitest. Having TestHelper and AssertionHelper included in the public release of the gem would be greatly helpful for us so we can take advantage of the functionality built here. They're currently inaccessible as they're located inside the test directory.

Describe the solution you'd like

Have TestHelper and AssertionHelper bundled in the gem.

Describe alternatives you've considered

RuboCop has some RSpec helpers which are included in the gem, like ExpectOffense. However, it seems like you've already done the work to port it to Minitest, which is exactly what we need.

@koic koic added the enhancement New feature or request label Nov 18, 2021
@koic koic self-assigned this Nov 18, 2021
koic added a commit to koic/rubocop-minitest that referenced this issue Nov 18, 2021
…or custom cop development

Resolves rubocop#155.

This PR provides `assert_offense`, `assert_correction`, and `assert_no_offenses`
for custom Minitest cop development.

Developers can use these APIs by requesting the following in your cop's test code:

```ruby
require 'rubocop/minitest/support'
```
koic added a commit to koic/rubocop-minitest that referenced this issue Nov 18, 2021
…or custom cop development

Resolves rubocop#155.

This PR provides `assert_offense`, `assert_correction`, and `assert_no_offenses`
for custom Minitest cop development.

Developers can use these APIs by requesting the following in custom Minitest cop test code:

```ruby
require 'rubocop/minitest/support'
```
koic added a commit to koic/rubocop-minitest that referenced this issue Nov 18, 2021
…or custom cop development

Resolves rubocop#155.

This PR provides `assert_offense`, `assert_correction`, and `assert_no_offenses`
testing APIs for custom Minitest cop development.

Developers can use these APIs by requesting the following in custom Minitest cop test code:

```ruby
require 'rubocop/minitest/support'
```
@koic koic closed this as completed in #156 Nov 20, 2021
koic added a commit that referenced this issue Nov 20, 2021
[Fix #155] Provide `assert_offense` and `assert_no_offenses` for custom cop development
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
2 participants