more detailed location info for mspec failures
@@ -6,7 +6,7 @@ module MSpec
#RHO
@count = 0
@exc_count = 0
- @exc_locations = []
+ @exc_locations = {}
#RHO
@exit = nil
@@ -68,7 +68,7 @@ module MSpec
#RHO
@count = 0
@exc_count = 0
- @exc_locations = []
+ @exc_locations = {}
#RHO
STDOUT.puts RUBY_DESCRIPTION
@@ -139,7 +139,18 @@ module MSpec
#RHO
puts "FAIL: #{current} - #{exc.message}\n" + (@backtrace ? exc.backtrace.join("\n") : "")
- @exc_locations << { 'message' => exc.message, 'backtrace' => exc.backtrace }
+
+ info = { 'message' => exc.message, 'backtrace' => exc.backtrace }
+
+ key = current.state.description
+
+ if @exc_locations[key].nil?
+ @exc_locations[key] = []
+ end
+
+ @exc_locations[key] << info
+
+ #@exc_locations << { 'spec' => current, 'message' => exc.message, 'backtrace' => exc.backtrace }
@exc_count+=1
#RHO
