Commit dc54e684cd413ab7b85341882667c74ff8c18a25

Got rspec/autotest compatibility closer. Seems to be working well now with everything but --drb."

git-svn-id: http://rspec.rubyforge.org/svn/trunk@3311 410327ef-2207-0410-a325-f78bbcb22a5a

Commit diff

rspec/lib/autotest/rspec.rb

 
2222 def initialize
2323 super
2424 self.failed_results_re = /^\d+\)\n(?:\e\[\d*m)?(?:.*?Error in )?'([^\n]*)'(?: FAILED)?(?:\e\[\d*m)?\n(.*?)\n\n/m
25 self.completed_re = /\Z/ # FIX: some sort of summary line at the end?
25 self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m
2626 end
2727
2828 def consolidate_failures(failed)
29 filters = Hash.new { |h,k| h[k] = [] }
30 failed.each do |spec, failed_trace|
31 if f = test_files_for(failed).find { |f| failed_trace =~ Regexp.new(f) } then
32 filters[f] << spec
33 break
29 filters = new_hash_of_arrays
30 failed.each do |spec, trace|
31 if trace =~ /\n(\.\/)?(.*\.rb):[\d]+:\Z?/
32 filters[$2] << spec
3433 end
3534 end
3635 return filters
toggle raw diff

rspec/lib/spec/version.rb

 
66 TINY = 3
77 RELEASE_CANDIDATE = nil
88
9 BUILD_TIME_UTC = 20080215164335
9 BUILD_TIME_UTC = 20080216032148
1010
1111 STRING = [MAJOR, MINOR, TINY].join('.')
1212 TAG = "REL_#{[MAJOR, MINOR, TINY, RELEASE_CANDIDATE].compact.join('_')}".upcase.gsub(/\.|-/, '_')
toggle raw diff

rspec/spec/autotest/rspec_spec.rb

 
171171 common_setup
172172 @rspec_autotest = Rspec.new
173173
174 @spec_file = "./spec/autotest/rspec_spec.rb"
174 @spec_file = "spec/autotest/rspec_spec.rb"
175175 @rspec_autotest.instance_variable_set("@files", {@spec_file => Time.now})
176176 @rspec_autotest.stub!(:find_files_to_test).and_return true
177177 end
181181 end
182182
183183 it "should return a hash with the spec filename => spec name for each failure or error" do
184 @rspec_autotest.stub!(:test_files_for).and_return "./spec/autotest/rspec_spec.rb"
184 @rspec_autotest.stub!(:test_files_for).and_return "spec/autotest/rspec_spec.rb"
185185 failures = [
186186 [
187187 "false should be false",
188188 "expected: true,\n got: false (using ==)\n#{@spec_file}:203:"
189189 ]
190190 ]
191 @rspec_autotest.consolidate_failures(failures).should == {@spec_file => ["false should be false"]}
191 @rspec_autotest.consolidate_failures(failures).should == {
192 @spec_file => ["false should be false"]
193 }
192194 end
193195
194196 end
toggle raw diff

rspec_on_rails/lib/spec/rails/version.rb

 
11module Spec
22 module Rails
33 module VERSION #:nodoc:
4 BUILD_TIME_UTC = 20080215164335
4 BUILD_TIME_UTC = 20080216032148
55 end
66 end
77end
toggle raw diff