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

Using require_relative to help using minitest #67

Closed

Conversation

fabioperrella
Copy link
Contributor

Hi!

When I was doing #66 I was trying to find a way to run only 1 test scenario, like I am used to do with rspec.

Then, installed the gem m, tried to run only 1 scenario and got this error:

$ m tests/jpeg_test.rb:36
Failed loading test file:
cannot load such file -- test_helper
There were no tests found.

Then, I changed require by require_relative and I managed to run the way I wanted:

$ m tests/jpeg_test.rb:36
Run options: -n "/^(test_size)$/" --seed 40264

# Running:

.

Finished in 0.001608s, 621.8906 runs/s, 3731.3435 assertions/s.
1 runs, 6 assertions, 0 failures, 0 errors, 0 skips

I'm not sure if there is a way to run a specific scenario with the gem test-unit which is the default for this project.

But I think the modification that I'm proposing will not affect anything.

@remvee
Copy link
Owner

remvee commented Sep 11, 2020

This breaks Ruby 1.8.7 support (see https://github.com/remvee/exifr/blob/master/exifr.gemspec#L10). Also running a single test is possible without any extra gems; ruby -I tests tests/jpeg_test.rb -n test_size

@remvee remvee closed this Sep 11, 2020
@fabioperrella
Copy link
Contributor Author

humm, I didn't notice that, tks!

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

2 participants