Home | History | Annotate | Download | only in test
      1 namespace :test do
      2   desc "run test suite with node.js"
      3   task :node => :build do
      4     # make sure jasmine-node exists, and barf if it doesn't
      5     if %x['jasmine-node'] =~ /USAGE/
      6       unless system 'jasmine-node', base_path.join('spec').to_s
      7         raise "node.js tests failed"
      8       end
      9     else
     10       puts "jasmine-node is not available"
     11       puts
     12       puts "Please run:"
     13       puts "   npm install -g jasmine-node"
     14       puts
     15       puts "...and then try again."
     16       puts
     17       exit
     18     end
     19   end
     20 end
     21