rxswiftcommunity / rxnimble Goto Github PK
View Code? Open in Web Editor NEWNimble extensions making unit testing with RxSwift easier :tada:
License: MIT License
Nimble extensions making unit testing with RxSwift easier :tada:
License: MIT License
Simple solution is turn off RxNimble's bitcode generation.
I think we should add target_xcconfig to turn off bitcode like Nimble does?
Library/Developer/Xcode/DerivedData/Fungogo-cuofhjsqszwhrjeanimgqkwzqduy/Build/Products/Debug-iphoneos/Nimble.framework/Nimble' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
RxNimble 4.1.0
Nimble 7.1.3
I am getting
Cycle path: RxNimble → Nimble → RxNimble
Cycle details:
→ Target 'RxNimble' has target dependency on Target 'Nimble'
...
I personally ran into a problem where Single was not supported. Single is widely used for HTTP requests as we expect just a single value/error, not a stream of multiple events.
Currently, expectation confronts to T : ObservableType
, if it would be switched to T: ObservableConvertibleType
, it would support all observables that have toBlocking
support.
When comparing instances or classes the methods beAnInstanceOf
and beAKindOf
returns a Predicate<Any>
but RxNimble expectation ask's for Predicate<T>
instead.
Code:
let driverObject = Driver.just(Int())
// doesn't compile
expect(driverObject.asObservable()).first.to(beAnInstanceOf(Int.self))
// compile
let result = try! driverObject.asObservable().toBlocking().first()
expect(result).to(beAnInstanceOf(Int.self))
I don't know if it is as expected or if we can improve this.
Therefore I'm at your disposal to make a PR for this, but I would need some direction since I think this is not as easy as just changing the type of var first
These methods were deprecated in 2017/11/02. I think two years are more than enough to migrate codebase (especially for such small repo). What do you think about removing them with version bump? Just to prevent potential user confusion.
When using SPM, the following error message is displayed.
The package product 'RxSwift' requires minimum platform version 9.0 for the iOS platform, but this target supports 8.0
The package product 'Nimble' requires minimum platform version 9.0 for the iOS platform, but this target supports 8.0
The package product 'RxTest' requires minimum platform version 9.0 for the iOS platform, but this target supports 8.0
The package product 'RxBlocking' requires minimum platform version 9.0 for the iOS platform, but this target supports 8.0
To solve this problem, you need to modify iOS deploy version macOS(.v10_10) to macOS(.v10_12) and iOS(.v8) to iOS(.v9) of Package.swift.
Please, add the Nimble 6.0+ support
I am using cocoapods, and RxNimble force version 5.1.1 to be installed, but 6.0.1 is available already
When using:
expect(subject).[last|first|array].to(throwError())
the tests only compile if the element used is Any
. Otherwise you get a compilation error.
So
let subject = ReplaySubject<**Any**>.createUnbounded()
subject.onError(AnyError.any)
expect(subject).first.to(throwError())
works.
While
let subject = ReplaySubject<**String**>.createUnbounded()
subject.onError(AnyError.any)
expect(subject).first.to(throwError())
proceses: Instance method 'to(_:description:)' requires the types 'String' and 'Any' be equivalent
This issue seems closely related to #38
I just tried to check out and build the project with Swift version 5.2 and got the error message
Could not find or use auto-linked library 'XCTest'
Could not find or use auto-linked library 'XCTestSupport'
When I explicitly link the XCTest framework into the project, it works just fine, but I cannot build my project when using this library with carthage.
XCode: v11.4
Swift: v5.2
RxNimble: v4.7.1
I cannot build the project. It shows auto-link error.
ld: warning: Could not find or use auto-linked library 'XCTestSwiftSupport'
Undefined symbols for architecture arm64:
"__swift_FORCE_LOAD_$_XCTestSwiftSupport", referenced from:
__swift_FORCE_LOAD_$_XCTestSwiftSupport_$_RxNimbleRxTest in ThrowError+RxTest.o
__swift_FORCE_LOAD_$_XCTestSwiftSupport_$_RxNimbleRxTest in Expectation+RxTest.o
__swift_FORCE_LOAD_$_XCTestSwiftSupport_$_RxNimbleRxTest in Equal+RxTest.o
__swift_FORCE_LOAD_$_XCTestSwiftSupport_$_RxNimbleRxTest in Expectation+Ext.o
(maybe you meant: __swift_FORCE_LOAD_$_XCTestSwiftSupport_$_RxNimbleRxTest)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
We should be testing this library.
Hi, when using Xcode 15, RxNimble has an error 'Predicate' is ambiguous for type lookup in this context since Foundation has a conflict type Predicate
with Nimble.
This is the related issue link in Nimble. I think maybe you want to consider the workaround described in it.
The workaround for accessing making the Expectation
constructor "public" doesn't seem to work (anymore?):
extension Expectation {
init(_ expression: Expression<T>) {
self.expression = expression
}
// ...
}
I get the following error:
Initializer for struct 'Expectation' must use "self.init(...)" or "self = ..." because it is not in module 'Nimble'
I raised Quick/Nimble#531 - if that gets merged, I'll try to put up a PR to just use the constructor.
I recently found it very helpful to edit the expectation messages (such as this one), to also report actual values.
I changed:
.expectedTo("equal <\(String(describing: expectedValue))>"
To:
.expectedTo("equal <\(String(describing: expectedValue))> got <\(String(describing: actualValue))>"))
You might also find it useful.
Thanks for your great work!
Is the lack of Carthage support a design decision or just no one got to do it yet? 😊
Nimble 7.0.0 is released already, need to support it
pretty please :)
Could you add Swift Package Manager support?
Hi.
Thanks for creating the nice library.
I'm in trouble now with pod install
.
After adding a line pod 'RxNimble/RxTest'
to Podfile, pod install
fails with an error below:
[!] CocoaPods could not find compatible versions for pod "RxNimble/RxTest":
In Podfile:
RxNimble/RxTestNone of your spec sources contain a spec satisfying the dependency:
RxNimble/RxTest
.You have either:
- out-of-date source repos which you can update with
pod repo update
or withpod install --repo-update
.- mistyped the name or version.
- not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0,
pod repo update
does not happen onpod install
by default.
❌️ ERROR 31
How can I fix it?
Thanks in advance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.