aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-03-22 17:04:56 -0700
committerwycats <wycats@gmail.com>2010-03-22 17:14:28 -0700
commit15c31c7639b4329eba341bbe894abc9b79edc5c3 (patch)
tree20e5bf0c72ab86c7f6a7493d79820d6df3b57a3f /actionpack/test
parent1f93a46b435434b6d128493cd3480ca82e301766 (diff)
downloadrails-15c31c7639b4329eba341bbe894abc9b79edc5c3.tar.gz
rails-15c31c7639b4329eba341bbe894abc9b79edc5c3.tar.bz2
rails-15c31c7639b4329eba341bbe894abc9b79edc5c3.zip
open_session can just return the a dup of the current context.
At this point, its entire purpose in the open_session {} case was to delegate back to the IntegrationTest anyway.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/controller/integration_test.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/actionpack/test/controller/integration_test.rb b/actionpack/test/controller/integration_test.rb
index 2180466ca7..c9782856bd 100644
--- a/actionpack/test/controller/integration_test.rb
+++ b/actionpack/test/controller/integration_test.rb
@@ -173,14 +173,12 @@ class IntegrationTestTest < Test::Unit::TestCase
end
def test_opens_new_session
- @test.class.expects(:fixture_table_names).times(2).returns(['foo'])
-
session1 = @test.open_session { |sess| }
session2 = @test.open_session # implicit session
- assert_kind_of ::ActionController::Integration::Session, session1
- assert_kind_of ::ActionController::Integration::Session, session2
- assert_not_equal session1, session2
+ assert session1.respond_to?(:assert_template), "open_session makes assert_template available"
+ assert session2.respond_to?(:assert_template), "open_session makes assert_template available"
+ assert !session1.equal?(session2)
end
# RSpec mixes Matchers (which has a #method_missing) into