aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/plugins/rspec/lib/spec/runner.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-09-04 06:10:25 +0000
committerfrancis <francis>2008-09-04 06:10:25 +0000
commit5bde1025dc4d43ea53f63107b88711ebf8942408 (patch)
tree962c8b1fb32186fbd1ab15050ede8e560d9a63f6 /vendor/plugins/rspec/lib/spec/runner.rb
parentce2cf5ed73d81180e9f88d590daaa23989ee9472 (diff)
rspec for rails 2.1
Diffstat (limited to 'vendor/plugins/rspec/lib/spec/runner.rb')
-rw-r--r--vendor/plugins/rspec/lib/spec/runner.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/plugins/rspec/lib/spec/runner.rb b/vendor/plugins/rspec/lib/spec/runner.rb
index 1a9373fee..97ef95bd2 100644
--- a/vendor/plugins/rspec/lib/spec/runner.rb
+++ b/vendor/plugins/rspec/lib/spec/runner.rb
@@ -183,6 +183,20 @@ module Spec
def configure
yield configuration
end
+
+ def register_at_exit_hook # :nodoc:
+ $spec_runner_at_exit_hook_registered ||= nil
+ unless $spec_runner_at_exit_hook_registered
+ at_exit do
+ unless $! || Spec.run?; \
+ success = Spec.run; \
+ exit success if Spec.exit?; \
+ end
+ end
+ $spec_runner_at_exit_hook_registered = true
+ end
+ end
+
end
end
end