Value of full_messages on stubbed out AR instances should be an Array.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Marcel Molina
2005-12-26 19:40:14 +00:00
parent 839f03b7d0
commit 0b55ce7191
2 changed files with 6 additions and 8 deletions

View File

@@ -309,12 +309,10 @@ module Test #:nodoc:
end
def clean_backtrace(&block)
begin
yield
rescue AssertionFailedError => e
path = File.expand_path(__FILE__)
raise AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ }
end
yield
rescue AssertionFailedError => e
path = File.expand_path(__FILE__)
raise AssertionFailedError, e.message, e.backtrace.reject { |line| File.expand_path(line) =~ /#{path}/ }
end
end
end

View File

@@ -87,7 +87,7 @@ class ActionPackAssertionsController < ActionController::Base
def errors
Class.new do
def full_messages; '...stuff...'; end
def full_messages; []; end
end.new
end
@@ -106,7 +106,7 @@ class ActionPackAssertionsController < ActionController::Base
def errors
Class.new do
def full_messages; '...stuff...'; end
def full_messages; ['...stuff...']; end
end.new
end
end.new