From b2b459a41aa5af59fa10265b464fc965006f1775 Mon Sep 17 00:00:00 2001 From: David Chelimsky Date: Sat, 26 Jun 2010 21:21:59 -0500 Subject: [PATCH] move the return values directly to the run method (more intention revealing there) --- lib/rspec/core/example.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/rspec/core/example.rb b/lib/rspec/core/example.rb index 0d9a7fafd2..9bccc8065d 100644 --- a/lib/rspec/core/example.rb +++ b/lib/rspec/core/example.rb @@ -66,12 +66,16 @@ def run(example_group_instance, reporter) if exception run_failed(reporter, exception) + false elsif pending_declared_in_example run_pending(reporter, pending_declared_in_example) + true elsif pending run_pending(reporter, 'Not Yet Implemented') + true else run_passed(reporter) + true end end @@ -92,17 +96,14 @@ def run_started def run_passed(reporter=nil) run_finished reporter, 'passed' - true end def run_pending(reporter, message) run_finished reporter, 'pending', :pending_message => message - true end def run_failed(reporter, exception) run_finished reporter, 'failed', :exception_encountered => exception - false end def run_finished(reporter, status, results={})