diff --git a/Gemfile b/Gemfile index ac948cae7..bfea88ee6 100644 --- a/Gemfile +++ b/Gemfile @@ -77,6 +77,19 @@ end # For running unit tests group :test do + + if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" + module Kernel + alias :_at_exit :at_exit + def at_exit(&block) + _at_exit do + exit_status = $!.status if $!.is_a?(SystemExit) + block.call + exit exit_status if exit_status + end + end + end + end if ENV['BEEF_TEST'] gem 'test-unit' gem 'test-unit-full' diff --git a/Rakefile b/Rakefile index f40716bbe..73c4f2cee 100644 --- a/Rakefile +++ b/Rakefile @@ -6,18 +6,6 @@ require 'yaml' #require 'pry-byebug' -if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" - module Kernel - alias :_at_exit :at_exit - def at_exit(&block) - _at_exit do - exit_status = $!.status if $!.is_a?(SystemExit) - block.call - exit exit_status if exit_status - end - end - end -end task :default => ["quick"]