mirror of
https://github.com/github/rails.git
synced 2026-01-27 23:38:11 -05:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user