Update for rspec 2.12. vim-stuff
authorMahlon E. Smith <mahlon@martini.nu>
Wed, 02 Jan 2013 09:14:17 -0800
branchvim-stuff
changeset 28 2b198f0a86fe
parent 27 595320486f69
child 29 dda9eb90cf5d
Update for rspec 2.12.
specky/ruby/specky_formatter.rb
--- a/specky/ruby/specky_formatter.rb	Wed Sep 12 10:45:25 2012 -0700
+++ b/specky/ruby/specky_formatter.rb	Wed Jan 02 09:14:17 2013 -0800
@@ -106,12 +106,9 @@
 				exception.message.split("\n").each {|l| self.out l}
 
 				# logic taken from the base class
-				example.example_group.ancestors.push(example.example_group).each do |group|
-					if group.metadata[:shared_group_name]
-						self.out "Shared Example Group: \"#{group.metadata[:shared_group_name]}\" called from " +
-							"#{backtrace_line(group.metadata[:example_group][:location])}"
-						break
-					end
+				if shared_group = find_shared_group(example)
+					self.out "Shared Example Group: \"#{shared_group.metadata[:shared_group_name]}\" called from " +
+						"#{backtrace_line(shared_group.metadata[:example_group][:location])}"
 				end
 			end