Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 0b55ce7191b167d67ec7ccc7eb8db2e5fac4f2e1 1 parent 839f03b
Marcel Molina authored
View
10 actionpack/lib/action_controller/assertions.rb
@@ -309,12 +309,10 @@ def assert_valid(record)
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
4 actionpack/test/controller/action_pack_assertions_test.rb
@@ -87,7 +87,7 @@ def valid?
def errors
Class.new do
- def full_messages; '...stuff...'; end
+ def full_messages; []; end
end.new
end
@@ -106,7 +106,7 @@ def valid?
def errors
Class.new do
- def full_messages; '...stuff...'; end
+ def full_messages; ['...stuff...']; end
end.new
end
end.new
Please sign in to comment.
Something went wrong with that request. Please try again.