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

Make mocking random models easier #1475

Merged
merged 3 commits into from
Aug 5, 2013
Merged

Make mocking random models easier #1475

merged 3 commits into from
Aug 5, 2013

Commits on Aug 3, 2013

  1. merge config in getMockForModel

    Otherwise, to override just one key, it's necessary to set all the other
    defaults too
    AD7six committed Aug 3, 2013
    Configuration menu
    Copy the full SHA
    46b28aa View commit details
    Browse the repository at this point in the history
  2. make it possible to run this test on its own

    Without setting up paths to the test_app - two of the tests will fail
    
    Verify/demonstrate how to mock a model without a model existing
    AD7six committed Aug 3, 2013
    Configuration menu
    Copy the full SHA
    35b4ac0 View commit details
    Browse the repository at this point in the history
  3. bark if the model doesn't exist

    Getting the following warning:
    
        ReflectionException: Class Mock_Foo_e187b1d1 does not have a
    constructor, so you cannot pass any constructor arguments
    
    Is a much less obvious way of saying "the class you're trying to mock
    doesn't exist". Be more explicit
    AD7six committed Aug 3, 2013
    Configuration menu
    Copy the full SHA
    ff856b7 View commit details
    Browse the repository at this point in the history