Skip to content

Commit

Permalink
move the return values directly to the run method (more intention rev…
Browse files Browse the repository at this point in the history
…ealing there)
  • Loading branch information
dchelimsky committed Jun 27, 2010
1 parent 518f6b6 commit b2b459a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/rspec/core/example.rb
Expand Up @@ -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

Expand All @@ -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={})
Expand Down

0 comments on commit b2b459a

Please sign in to comment.