Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Try to run compat tests with Rake::TestTask

This should make the compat specs run under integrity
installs at Heroku.
  • Loading branch information...
commit caca9abd4ccbb4ee0cdfe1ff0963201bc3819d93 1 parent c31a2b8
@sr sr authored rtomayko committed
Showing with 11 additions and 10 deletions.
  1. +11 −10 Rakefile
View
21 Rakefile
@@ -7,6 +7,8 @@ task :spec => :test
# SPECS ===============================================================
+task(:test) { puts "==> Running main test suite" }
+
Rake::TestTask.new(:test) do |t|
t.test_files = FileList['test/*_test.rb']
t.ruby_opts = ['-rubygems'] if defined? Gem
@@ -16,18 +18,17 @@ desc "Run < 0.9.x compatibility specs"
task :compat do
begin
require 'mocha'
- rescue LoadError
- puts 'WARN: skipping compat tests. mocha gem required.'
- next
- end
+ require 'test/spec'
+ at_exit { exit 0 } # disable test-spec at_exit runner
- if ! system('specrb --help &>/dev/null')
- puts 'WARN: skipping compat tests. test-spec gem required.'
- next
+ puts "==> Running compat test suite"
+ Rake::TestTask.new(:compat) do |t|
+ t.test_files = FileList['compat/*_test.rb']
+ t.ruby_opts = ['-rubygems'] if defined? Gem
+ end
+ rescue LoadError
+ warn 'Skipping compat tests. mocha and/or test-spec gems not installed.'
end
-
- pattern = ENV['TEST'] || '.*'
- sh "specrb --testcase '#{pattern}' -Ilib:test compat/*_test.rb"
end
# PACKAGING ============================================================
Please sign in to comment.
Something went wrong with that request. Please try again.