Rakefile in ProMotion-1.1.2 vs Rakefile in ProMotion-1.2.0

- old
+ new

@@ -1,13 +1,9 @@ $:.unshift("/Library/RubyMotion/lib") require 'motion/project/template/ios' require 'bundler' - -# this follow from gemspec Bundler.require(:development) - -# this follow development code require 'ProMotion' Motion::Project::App.setup do |app| app.name = 'ProMotionTest' app.version = "0.99.0" @@ -15,24 +11,22 @@ app.frameworks += %w(CoreLocation MapKit) # Devices app.deployment_target = "6.0" app.device_family = [:ipad] # so we can test split screen capability - - app.detect_dependencies = true end def all_files App.config.spec_files end def functional_files - Dir.glob('./spec/functional/*.rb') + Dir.glob('./spec/functional/**/*.rb') end def unit_files - Dir.glob('./spec/unit/*.rb') + Dir.glob('./spec/unit/**/*.rb') end namespace :spec do task :unit do App.config.spec_mode = true @@ -48,9 +42,20 @@ task :functional do App.config.spec_mode = true spec_files = all_files spec_files -= unit_files + App.config.instance_variable_set("@spec_files", spec_files) + Rake::Task["simulator"].invoke + end + + task :single do + App.config.spec_mode = true + spec_files = App.config.spec_files + spec_files -= unit_files + spec_files -= functional_files + spec_files += Dir.glob("./spec/unit/**/#{ENV['f'] || ENV['file']}.rb") + spec_files += Dir.glob("./spec/functional/**/#{ENV['f'] || ENV['file']}.rb") App.config.instance_variable_set("@spec_files", spec_files) Rake::Task["simulator"].invoke end end