Skip to content

Commit

Permalink
Fixed spec so it passes on ruby 1.9.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
myronmarston authored and dchelimsky committed Oct 10, 2010
1 parent a8a3aba commit 6817f4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion lib/autotest/rspec2.rb
Expand Up @@ -10,7 +10,10 @@ def initialize
super super
clear_mappings clear_mappings
setup_rspec_project_mappings setup_rspec_project_mappings
self.failed_results_re = /^\s*\d\).*\n\s+Failure.*(\n\s+#\s(.*)?:\d+)+$/m
# Example for Ruby 1.8: http://rubular.com/r/AOXNVDrZpx
# Example for Ruby 1.9: http://rubular.com/r/85ag5AZ2jP
self.failed_results_re = /^\s*\d+\).*\n\s+Failure.*(\n\s+#\s(.*)?:\d+(?::.*)?)+$/m
self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m self.completed_re = /\n(?:\e\[\d*m)?\d* examples?/m
end end


Expand Down
4 changes: 2 additions & 2 deletions spec/autotest/failed_results_re_spec.rb
Expand Up @@ -14,7 +14,7 @@


it "matches a failure" do it "matches a failure" do
re = Autotest::Rspec2.new.failed_results_re re = Autotest::Rspec2.new.failed_results_re
re =~ example_output example_output.should =~ re
$2.should == __FILE__.sub(File.expand_path('.'),'.') example_output[re, 2].should == __FILE__.sub(File.expand_path('.'),'.')
end end
end end

0 comments on commit 6817f4e

Please sign in to comment.