Permalink
Browse files

Make assertions in integration sessions proxy to the test instance (o…

…nly for sessions created via open_session)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3836 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 51d6bc2 commit 8152695b809aa47177ab5d5db43d93d8f55ee52a @jamis jamis committed Mar 10, 2006
Showing with 3 additions and 0 deletions.
  1. +3 −0 actionpack/lib/action_controller/integration_test.rb
@@ -488,6 +488,9 @@ def open_session
klass.send(:define_method, name) { |*args| tests.send(name, *args) }
end
+ # delegate add_assertion to the test case
+ klass.send(:define_method, :add_assertion) { tests.add_assertion }
+
yield session if block_given?
session
end

0 comments on commit 8152695

Please sign in to comment.