Skip to content

Nimble extensions making unit testing with RxSwift easier 🎉

License

Notifications You must be signed in to change notification settings

adamcichy/RxNimble

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

RxNimble

Nimble extensions that making 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. Check is a blocking call, hence the name.

But writing code to check an Observable's value is sooooo tedious:

let result = try! observable.toBlocking().first()
expect(result) == 42

With RxNimble, we've added Nimble extension for Observables, so the code above can be rewritten as:

expect(observable).first == 42

Nice.

Installation

Add to your podfile:

pod 'RxNimble'

And pod install and that's it!

Known Issues

Very very very rarely the Swift compiler gets confused about the different types and you need to use the original RxBlocking code.

License

MIT ofc.

Give yourself a high five

About

Nimble extensions making unit testing with RxSwift easier 🎉

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 83.0%
  • Ruby 17.0%