build/test_basics.rb in passenger-4.0.20 vs build/test_basics.rb in passenger-4.0.21

- old
+ new

@@ -23,14 +23,14 @@ TEST_BOOST_OXT_LIBRARY = LIBBOOST_OXT TEST_COMMON_LIBRARY = COMMON_LIBRARY TEST_COMMON_CFLAGS = "-DTESTING_APPLICATION_POOL " << - "#{PlatformInfo.portability_cflags} #{EXTRA_CXXFLAGS}" + "#{EXTRA_CXXFLAGS}" desc "Run all unit tests and integration tests" -task :test => ['test:oxt', 'test:cxx', 'test:ruby', 'test:integration'] +task :test => ['test:oxt', 'test:cxx', 'test:ruby', 'test:node', 'test:integration'] desc "Clean all compiled test files" task 'test:clean' do sh("rm -rf test/oxt/oxt_test_main test/oxt/*.o test/cxx/*.dSYM test/cxx/CxxTestMain") sh("rm -f test/cxx/*.o test/cxx/*/*.o test/cxx/*.gch") @@ -45,20 +45,29 @@ desc "Install developer dependencies" task 'test:install_deps' do gem_install = PlatformInfo.gem_command + " install --no-rdoc --no-ri" gem_install = "#{PlatformInfo.ruby_sudo_command} #{gem_install}" if boolean_option('SUDO') - sh "#{gem_install} rails -v 2.3.15" - sh "#{gem_install} bundler rspec mime-types daemon_controller json rack" - sh "#{gem_install} mizuho bluecloth" if boolean_option('DOCTOOLS', true) - if boolean_option('RAILS_BUNDLES', true) + default = boolean_option('DEVDEPS_DEFAULT', true) + + if boolean_option('BASE_DEPS', default) + sh "#{gem_install} rails -v 2.3.15" + sh "#{gem_install} bundler rspec mime-types daemon_controller json rack" + end + if boolean_option('DOCTOOLS', default) + sh "#{gem_install} mizuho bluecloth" + end + if boolean_option('RAILS_BUNDLES', default) sh "cd test/stub/rails3.0 && bundle install" sh "cd test/stub/rails3.1 && bundle install" sh "cd test/stub/rails3.2 && bundle install" ruby_version_int = RUBY_VERSION.split('.')[0..2].join.to_i if ruby_version_int >= 190 sh "cd test/stub/rails4.0 && bundle install" end + end + if boolean_option('NODE_MODULES', default) + sh "npm install mocha should sinon" end end