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

Use .NoError() instead of .Nil() for error checking in tests #1566

Closed
wants to merge 1 commit into from

Conversation

spencerhakim
Copy link
Contributor

Noticed this while working on my other PR. .NoError() is the more correct function, as it actually prints the error instead of just saying it should've been nil, with an ugly pointer address to a string.

I made this change with a regex find/replace. It was rather specific, so there shouldn't have been any lines changed by mistake (and I didn't notice any when looking at the diff), but it's possible I missed some lines that should've been changed.

…rror prints the error instead of just saying it should’ve been nil
@codecov-io
Copy link

Current coverage is 29.73% (diff: 100%)

Merging #1566 into master will not change coverage

@@             master      #1566   diff @@
==========================================
  Files           138        138          
  Lines         13212      13212          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           3929       3929          
  Misses         8863       8863          
  Partials        420        420          

Powered by Codecov. Last update 1420911...b43ee05

@ddollar ddollar added this to the 20170118 milestone Jan 18, 2017
ddollar added a commit that referenced this pull request Jan 18, 2017
@ddollar ddollar mentioned this pull request Jan 18, 2017
18 tasks
ddollar added a commit that referenced this pull request Jan 18, 2017
@MiguelMoll MiguelMoll modified the milestone: 20170118 Jan 18, 2017
MiguelMoll added a commit that referenced this pull request Jan 18, 2017
@MiguelMoll MiguelMoll mentioned this pull request Jan 18, 2017
18 tasks
@spencerhakim spencerhakim deleted the fix-error-checks branch January 18, 2017 20:33
SonOfBytes pushed a commit to SonOfBytes/rack that referenced this pull request Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants