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

[WIP] Fail fast if mocking before setup #319

Closed
wants to merge 3 commits into from

Commits on Mar 27, 2018

  1. SPIKE: Fail fast if mocking/stubbing before Mocha is setup

    i.e. outside the per-test lifecycle; e.g. RSpec's `before(:all)` blocks.
    
    In this commit a "Null Object" Mockery instance is set as the default
    and only replaced by the a real Mockery instance when
    `Hooks#mocha_setup` is called by the test framework, i.e. once the
    lifecycle of an individual test has started.
    
    The Mockery is now always explicitly built, rather than being
    lazily instantiated.
    
    Using a `StubbingError` filters the Mocha files out of the backtrace.
    
    I have not modified the existing tests nor added any new ones, so this
    will need some work before it can be merged into `master`.
    
    See #292 for more details.
    floehopper committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    f0f8e58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1da71b9 View commit details
    Browse the repository at this point in the history
  3. WIP: Fix unit tests

    floehopper committed Mar 27, 2018
    Configuration menu
    Copy the full SHA
    f2556a0 View commit details
    Browse the repository at this point in the history