Here’s a quickie to add to your RubyMotion
task 'simclose' do sh "osascript -e 'tell application \"iphone simulator\" to quit'" end
Now you can run your specs with:
rake specs simclose
And the simulator will close automatically after the specs are run.
I just realized that some of you would rather have the simulator close after every spec run, rather than explicitly specify it. To do that, just name the task “spec”. That will add the new task commands to the existing “spec” task.✦ Permalink