Closed hboon closed 8 years ago
Do you mean test as in a spec for this or whether this is useful? For the former, I'm not sure how to write one, other than verifying that it's false (because it's in the simulator)?
Oh, i definitely think it's useful... but tests can run on the device as well. The test should probably check to see what device it is and if it's a 6s or a 6s Plus, it should return true
.
Ah, OK.
I usually use this: https://gist.github.com/hboon/e22943f155cc628c782d. I don't think -moHardwareString can be translated to RubyMotion though. Any idea how to check for device type otherwise?
I want to get this in patch in because I'm already using it :) Anyone have any idea how to write a test for this? Ping @clayallsopp @colinta for help.
(The Travis failure looks unrelated).
Cool! I'm until the sim adds support, we can't test it. I'll take a look and merge soon.
On Jan 15, 2016, at 11:06 PM, Hwee-Boon Yar notifications@github.com wrote:
I want to get this in patch in because I'm already using it :) Anyone have any idea how to write a test for this? Ping @clayallsopp @colinta for help.
(The Travis failure looks unrelated).
― Reply to this email directly or view it on GitHub.
@colinta did you have a chance to look at this? Want to get rid of my private fork :)
Ah yes, thank's for reminding me! @markrickert I'm gonna punt on requiring specs, because those won't be picked up in automated testing. If he's been using this code successfully this whole time than it's obviously working, that's good enough for me.
@colinta thanks!
lol, no worries... I'm pretty sure it's not possible to automate the testing for this.
Nice! I'm wondering if tests for this would be of any benefit?