• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rspec / rspec-mocks / 1033 / 8
98%
master: 63%

Build:
Build:
LAST BUILD BRANCH: use-method-handle-for-from-support
DEFAULT BRANCH: master
Ran 15 Aug 2013 07:10AM UTC
Files 34
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Aug 2013 07:08AM UTC coverage: 99.435%. First build
rbx-19mode

push

travis-ci

myronmarston
Refactor to improve perf.

- Don't get the original method handle for a test double
  (it doesn't have an original method as its not a partial mock).
- Leverage InstanceMethodStasher; since it has to stash the method
  anyway, it can store it so we don't have to waste effort getting
  it.
- Delay getting the original_method until the last possible moment:
  right before we redefine it with a new definition.

As a side benefit, this change makes it so that we no longer
"leak" odd obfuscated aliased methods onto partial mock objects.
This is a good thing.

I ran benchmarks of this commits vs the prior (unoptimized fix)
vs what we originally had in master using this shell command:

time (for i in {1..20}; do bin/rspec -fp --order default; done)

Here are the totals:

- this commit: 39.070 seconds
- prior unoptimized fix (c864e0a53): 39.936
- master (80d80d919): 37.783

1759 of 1769 relevant lines covered (99.43%)

115.49 hits per line

Source Files on job 1033.8 (rbx-19mode)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1033
  • Travis Job 1033.8
  • 87d939de on github
  • Next Job for rbx-19mode on get_original_method_early (#1036.8)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc