Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix only-once stub logic. #7294

Merged
merged 1 commit into from

2 participants

@stevecj

Follow-up: fix the fix.

Didn't fail the test because adapter#query happens to
not call raw connection's #query, but don't want to count
on that and have a fragile test.

Steve Jorgensen Fix only-once stub logic.
Didn't fail the test because adapter#query happens to
not call raw connection's #query, but don't want to count
on that and have a fragile test.
1e17a9d
@rafaelfranca rafaelfranca merged commit b8903f3 into rails:master
@stevecj stevecj referenced this pull request
Merged

3 2 stable #7632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 8, 2012
  1. Fix only-once stub logic.

    Steve Jorgensen authored
    Didn't fail the test because adapter#query happens to
    not call raw connection's #query, but don't want to count
    on that and have a fragile test.
This page is out of date. Refresh to see the latest.
View
2  activerecord/test/cases/adapters/postgresql/connection_test.rb
@@ -92,9 +92,9 @@ def test_reconnection_after_simulated_disconnection_with_verify
def query_fake(*args)
if !( @called ||= false )
self.stubs(:status).returns(PGconn::CONNECTION_BAD)
+ @called = true
raise PGError
else
- @called = true
self.unstub(:status)
query_unfake(*args)
end
Something went wrong with that request. Please try again.