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

Make LoadError from running tests more obvious #195

Merged
merged 4 commits into from
May 2, 2017

Conversation

drbrain
Copy link
Member

@drbrain drbrain commented Feb 23, 2017

When you attempt to run tests on a nonexistent file the error can be buried (see #194). This change adds some whitespace and removes the backtrace to make the error more visible.

$ rake test TEST=no_such_file
/usr/local/bin/ruby -w -I"lib:test" -I"/Users/erichodel/Work/git/rake/lib" "/Users/erichodel/Work/git/rake/lib/rake/rake_test_loader.rb" "no_such_file" 

cannot load such file -- /Users/erichodel/Work/git/rake/no_such_file

rake aborted!
Command failed with status (1): [ruby -w -I"lib:test" -I"/Users/erichodel/Work/git/rake/lib" "/Users/erichodel/Work/git/rake/lib/rake/rake_test_loader.rb" "no_such_file" ]

Tasks: TOP => test
(See full trace by running task with --trace)

@coveralls
Copy link

coveralls commented Feb 23, 2017

Coverage Status

Coverage decreased (-0.02%) to 96.553% when pulling 48a9c46 on drbrain/better-load-error into af15762 on master.

JRuby uses a different error message for LoadError than CRuby
@coveralls
Copy link

coveralls commented Feb 23, 2017

Coverage Status

Coverage decreased (-0.01%) to 96.561% when pulling 66ec746 on drbrain/better-load-error into af15762 on master.

@coveralls
Copy link

coveralls commented Feb 23, 2017

Coverage Status

Coverage decreased (-0.01%) to 96.561% when pulling fdc443a on drbrain/better-load-error into af15762 on master.

JRuby uses a different path for LoadError than CRuby
@coveralls
Copy link

coveralls commented Feb 23, 2017

Coverage Status

Coverage decreased (-0.03%) to 96.541% when pulling 8d3a682 on drbrain/better-load-error into af15762 on master.

@drbrain
Copy link
Member Author

drbrain commented Feb 23, 2017

@coveralls Lies: this implementation is covered here

@hsbt
Copy link
Member

hsbt commented Feb 23, 2017

and I set coverage decrease threshold rate to 1%.

@drbrain
Copy link
Member Author

drbrain commented Feb 23, 2017

Someday I will circle back and report this bug to SimpleCov

@hsbt hsbt merged commit 52f55fc into master May 2, 2017
@hsbt hsbt deleted the drbrain/better-load-error branch May 2, 2017 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants