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

cgreen-devs / cgreen / 376
95%

Build:
DEFAULT BRANCH: master
Ran 01 Dec 2018 11:42AM UTC
Jobs 2
Files 76
Run time 35s
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

pending completion
376

push

travis-ci

thoni56
Add `times` constraint (#174)

In this commit the constraint that expect a mock to be invoked a specific number of times is added.

The implementation piggyback on the `time_to_live` of a recorder expectation to ensure it gets cleaned correctly when it is no longer expected.

To ensure a better error message a variable to store the number of times a specific mock was called was added to the structure `RecordedExpectation`.

The syntax that I selected for this was 
```
expect(function_name, times(3));
```

It looks more clean and also reads better, at least in my opinion.

Fixes issue #70

79 of 79 new or added lines in 3 files covered. (100.0%)

5589 of 5815 relevant lines covered (96.11%)

223645.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 376.1 (CGREEN_WITH_STATIC_LIBRARY="OFF") 01 Dec 2018 11:42AM UTC 0
96.11
Travis Job 376.1
3 376.3 (CGREEN_WITH_STATIC_LIBRARY="ON") 01 Dec 2018 11:43AM UTC 0
96.11
Travis Job 376.3
Source Files on build 376
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #376
  • 6e3e228c on github
  • Prev Build on master (#375)
  • Next Build on master (#377)
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