circleci / bond

spying for tests
127 stars 28 forks source link

Useful error message for when stub!/with-stub! will fail #43

Closed conormcd closed 5 years ago

conormcd commented 5 years ago

If a function was generated without :arglists metadata then it can't be stubbed using with-stub! since stub! can't verify the arity of the replacement function.

Instead of giving an inscrutable error message, we now assert that :arglists exists and produce an error message which points the user in the right direction.

Fixes: #41

codecov[bot] commented 5 years ago

Codecov Report

Merging #43 into master will increase coverage by 0.03%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
+ Coverage   98.59%   98.63%   +0.03%     
==========================================
  Files           1        1              
  Lines          71       73       +2     
  Branches        1        1              
==========================================
+ Hits           70       72       +2     
  Partials        1        1
Impacted Files Coverage Δ
src/bond/james.cljc 98.63% <100%> (+0.03%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6314300...35b3f7b. Read the comment docs.

conormcd commented 5 years ago

@j0ni Does this work for you?

j0ni commented 5 years ago

@conormcd that's grand, thank you for the prompt fix!

conormcd commented 5 years ago

@j0ni Released in 0.3.2.