Permalink
Browse files

failures now halt execution of the test, so render_checks could be ra…

…dically simplified
  • Loading branch information...
1 parent 69c08c6 commit 073616ecbf88a7721a5d9577d455d9bb16f82024 @quackingduck quackingduck committed Apr 28, 2010
Showing with 2 additions and 15 deletions.
  1. +2 −15 lib/environment.rb
View
@@ -55,26 +55,13 @@ def render_value(value)
end
def render_checks(checks)
- failure = nil
- out = []
- checks.each do |check|
- failure = check if check.failure?
- break if failure
- out << OrderedHash do |o|
+ checks.map do |check|
+ OrderedHash do |o|
o['name'] = check.name
o['status'] = check.status.to_s
o['result'] = render_value check.value if check.info?
end
end
- if failure
- out << OrderedHash do |o|
- o['name'] = failure.name
- o['status'] = failure.status.to_s
- # o['expected'] = failure.expectation
- # o['actual'] = render_value(failure.value)
- end
- end
- out
end
def render_error(error)

0 comments on commit 073616e

Please sign in to comment.