spec/spec_helper.rb in simplate-0.1.0 vs spec/spec_helper.rb in simplate-0.1.1

- old
+ new

@@ -6,5 +6,18 @@ pathname_root_module = Pathname.new(File.dirname(__FILE__)).parent.join('lib') Dir["#{pathname_root_module}/*.rb"].each {|file| require file} RSpec.configure do |config| end + +if defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" && RUBY_VERSION >= "1.9" + 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