-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix #41 unable to integrate test target #92
Fix #41 unable to integrate test target #92
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @joshuatbrown. We do need to get the tests working though. I may get some time to look into it this week.
Also, it'd be great to do another pod for the Mocks if you're interested!
#import "RZBSimulatedTestCase.h" | ||
#import "NSRunLoop+RZBWaitFor.h" | ||
#import "RZBCentralManager+Private.h" | ||
#import "RZBLog.h" | ||
#import "RZBluetooth/RZBCentralManager+Private.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a while... Why do we need the private header? Ideally we wouldn't, but if we can safely remove it we should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it exposes the RZBCommandDispatch *dispatch
property which is used in waitForQueueFlush
and required for RZBAssertCommandCount()
.
RZBluetoothTest.podspec
Outdated
Pod::Spec.new do |s| | ||
s.name = "RZBluetoothTest" | ||
s.version = "1.2.2" | ||
s.summary = "A Core Bluetooth helper library to simplify the development and testing of Core Bluetooth applications." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The summary should state that this pod is specifically so simplify testing bluetooth with XCTest and RZBluetooth mocks.
…egrate-test-target
@KingOfBrian I think I made all the changes you requested. I also updated the RZBluetoothExample app to use the RZBluetoothTest podspec. Can you re-review? |
This looks good — would love to get this merged. |
Does RZBluetoothMock need similar treatment to be broken out into its own podspec? |
This fixes #41. However, due to the way we fixed it, the Tests target in RZBluetooth no longer compiles. We've tried various ways to fix the problem but haven't found a solution yet. I'm hoping that by opening this PR, we'll get some help with the Tests target.
Here's what we did:
RZBluetooth/Test
subspecRZBSimulatedTestCase
since they now depend on the mainRZBluetooth/Mock
spec (and therefore need to be imported withRZBluetooth/...
)The second bullet is where the problem lies. By importing with
RZBluetooth/...
, we've broken the test target which does not have those files in a separate framework. But importing this way is required so that the newRZBluetoothTest
podspec builds in CocoaPods.