Rakefile in spreewald-0.8.0 vs Rakefile in spreewald-0.8.1

- old
+ new

@@ -1,10 +1,10 @@ #!/usr/bin/env rake require "bundler/gem_tasks" desc 'Default: Run all tests.' -task :default => 'tests:run' # now you can run the tests by just typing "rake" into your console +task :default => 'all:features' desc 'Update the "Steps" section of the README' task :update_readme do require 'support/documentation_generator' @@ -39,14 +39,14 @@ system("cp #{config_dir}/database.sample.yml #{config_dir}/database.yml") end end -namespace :tests do +namespace :all do desc "Run tests on all test apps" - task :run do # to run the tests type "rake tests:run" into your console + task :features do success = true for_each_directory_of('tests/**/Rakefile') do |directory| Bundler.with_clean_env do env = "FEATURE=../../#{ENV['FEATURE']}" if ENV['FEATURE'] success &= system("cd #{directory} && bundle exec rake features #{env}") @@ -74,10 +74,12 @@ def for_each_directory_of(path, &block) Dir[path].sort.each do |rakefile| directory = File.dirname(rakefile) puts '', "\033[44m#{directory}\033[0m", '' - unless RUBY_VERSION.start_with?("1.9") and directory.include?("rails-2.3") + if RUBY_VERSION.start_with?("1.9") and directory.include?("rails-2.3") + puts 'Skipping Rails 2.3 with Ruby 1.9.' + else block.call(directory) end end end