Permalink
Browse files

Add new rake specs for testing

Functionals take awhile, so if you just want to run everything else use `rake spec:units`
  • Loading branch information...
1 parent 8f04e2f commit afb2d839ba06b7305b9d08f60c3462f37f0ec530 @clayallsopp committed Jul 25, 2012
Showing with 20 additions and 5 deletions.
  1. +20 −5 Rakefile
View
@@ -9,9 +9,24 @@ require './lib/formotion'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'Formotion'
+end
- # Temporary, until RubyMotion patches its test loader
- spec_files = app.spec_files + Dir.glob(File.join(app.specs_dir, '**/*.rb'))
- spec_files.uniq!
- app.instance_variable_set(:@spec_files, spec_files)
-end
+namespace :spec do
+ task :units do
+ App.config.spec_mode = true
+ spec_files = App.config.spec_files
+ functional_files = Dir.glob('./spec/functional/**/*.rb')
+ spec_files -= functional_files
+ App.config.instance_variable_set("@spec_files", spec_files)
+ Rake::Task["simulator"].invoke
+ end
+
+ task :functionals do
+ App.config.spec_mode = true
+ spec_files = App.config.spec_files
+ row_type_files = Dir.glob('./spec/row_type/**/*.rb')
+ spec_files -= row_type_files
+ App.config.instance_variable_set("@spec_files", spec_files)
+ Rake::Task["simulator"].invoke
+ end
+end

0 comments on commit afb2d83

Please sign in to comment.