CocoaPods trunk is moving to be read-only. Read more on the blog, there are 11 months to go.

RxAdvancedNimble 1.0.2

RxAdvancedNimble 1.0.2

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Jul 2016
SPMSupports SPM

Maintained by Sergey Petrov.



 
Depends on:
Nimble~> 4.0
RxSwift~> 2.0
RxBlocking~> 2.0
 

  • By
  • Sergey Petrov

Nimble extensions that make unit testing with RxSwift easier

Why

RxSwift includes a really nifty little library called RxBlocking which provides convenience functions for peeking in on Observable instances. Also, there is a library called RxNimble which provides some operator overloads for equality checking. But sometimes we need more complicated matching than just equality, so this is why I created this library.

Currently you type something like this:

let observable = Observable.of(0, 1, 2, 3)
expect { try observable.toBlocking().last() }.to(equal(3))

Now you can only type:

let observable = Observable.of(0, 1, 2, 3)
expect(observable).toEmitLast(equal(3))

License

MIT