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

jjh42 / mock / 152
100%

Build:
DEFAULT BRANCH: master
Ran 16 Aug 2017 09:08PM UTC
Jobs 1
Files 1
Run time 2min
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
152

push

travis-ci

web-flow
Implement setup_with_mocks (#68)

A helper macro that'll help avoid copy-pasting the same mock
if it is required for all unit tests in some ExUnit.Case.

For simplicity, only add support for mocking multiple modules
in setup without all the shorthand helpers when only one mock
is needed.

Wrapper macro for `setup_all` was not implemented because maintaining
the mock state across tests is difficult if one of the tests in
the module needs custom behaviour. For example, assume 9/10 tests
in some file need the same mock, but the one other test, which belongs
in the same file, does not. The one specific test can override the
'global' mock. This is easy to achieve using `setup` but more difficult
using `setup_all` and provides more developer friendly behaviour.

- Implement setup_with_mocks with support for when context is
  specified and when it is not
- Unit tests
- Move the logic of mocking multiple modules into a helper macro
- Update the README with an explanation and an example

2 of 2 relevant lines covered (100.0%)

18.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 152.1 (MIX_ENV=test) 16 Aug 2017 09:08PM UTC 0
100.0
Travis Job 152.1
Source Files on build 152
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #152
  • 04e27bbf on github
  • Prev Build on master (#146)
  • Next Build on master (#153)
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