Skip to content

Add example project #37

Open
Open

Description

@ogezue

Is it possible to add an example project to see how to setup a complete project? At the moment it is not very clear how to use Mockingjay which will prevent many developers from using it.

Activity

  1. nitinalabur commented on Jan 11, 2016

    @nitinalabur

    +1

  2. paulyoung commented on Jan 14, 2016

    @paulyoung

    Mockingjay is used in Disc and Portal, both of which use MockingjayMatchers.

  3. paulyoung commented on Jan 14, 2016

    @paulyoung
  4. arielelkin commented on Mar 21, 2016

    @arielelkin

    @paulyoung thanks for sharing, but this is insufficient, it's still not clear how to setup a basic test suite from scratch using Mockingjay and XCTest.

  5. kylef commented on May 16, 2016

    @kylef
    Owner

    There's a complete example in Mockingjay's own tests. Check out https://github.com/kylef/Mockingjay/blob/master/MockingjayTests/MockingjayTests.swift#L34-54

  6. papertigers commented on Jul 14, 2016

    @papertigers

    I tried to use the following with Alamofire from the example you linked @kylef

    let stubbedError = NSError(domain: "Mockingjay Session Tests", code: 0, userInfo: nil)
    stub(everything, builder: failure(stubbedError))

    When I call the function from my api struct it returns the actual data from the web service.
    Am I doing something wrong?

  7. papertigers commented on Jul 16, 2016

    @papertigers

    @kylef never mind, console output was misleading due to the test target having "Host Application" set. This seems to be xcodes preferred way now. Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions