Brief testing lightning talk from April 2014's #sydinmotion.
def tdd_ios( hint: RubyMotion)@JONROWE
View Slide
@JONROWE
@JONROWESo don’t?
ObjectiveC
ObjectiveCTDD IS HARD!
ObjectiveCTDD IS HARD!(or just not popular)
PhoneGap?
PhoneGap?JS
PhoneGap?JSTDD’able
PhoneGap?JSTDD’ableSucks...
RubyMotion?
RubyMotion?Ruby
RubyMotion?RubyCompiles
RubyMotion?RubyCompilesAccess to all the APIs
Has testing built in
Bacon!
BaconMacBacon
BaconMacBaconRuns In Simulator
Unit Testing
Unit TestingIntegration Testing
Unit TestingIntegration TestingAcceptance Testing(limited)
Use Rubyisms
Use RubyismsStub web requests
Use RubyismsStub web requestsSimulate deviceevents
Felt Like Rails
Solution?
Pure Ruby Library
Pure Ruby LibraryRSpec / MiniTest
Pure Ruby LibraryRSpec / MiniTestRuby 2.0.0
Caveats:
Caveats:Libs don’t alwaysbehave the same.
Caveats:Libs don’t alwaysbehave the same.(JSON)
Caveats:no require
Caveats:no requireno metaprogramming
Caveats:no requireno metaprogrammingalloc / init vs initialize
end
Bonus Code
See Also:https://github.com/JonRowe/locomotion