aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-12-26 19:40:14 +0000
committerMarcel Molina <marcel@vernix.org>2005-12-26 19:40:14 +0000
commit0b55ce7191b167d67ec7ccc7eb8db2e5fac4f2e1 (patch)
tree59ec3f1b3cbbb241c95d468a81e17f2662b0da7b /actionpack
parent839f03b7d0ae9d9ff49cc777488630253186b184 (diff)
downloadrails-0b55ce7191b167d67ec7ccc7eb8db2e5fac4f2e1.tar.gz
rails-0b55ce7191b167d67ec7ccc7eb8db2e5fac4f2e1.tar.bz2
rails-0b55ce7191b167d67ec7ccc7eb8db2e5fac4f2e1.zip
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
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/assertions.rb10
-rw-r--r--actionpack/test/controller/action_pack_assertions_test.rb4
2 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb
index 999edc1440..baf36f768d 100644
--- a/actionpack/lib/action_controller/assertions.rb
+++ b/actionpack/lib/action_controller/assertions.rb
@@ -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
diff --git a/actionpack/test/controller/action_pack_assertions_test.rb b/actionpack/test/controller/action_pack_assertions_test.rb
index 6d5ade98bf..ed4ed7ca62 100644
--- a/actionpack/test/controller/action_pack_assertions_test.rb
+++ b/actionpack/test/controller/action_pack_assertions_test.rb
@@ -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