diff options
author | Steve Jorgensen <stevej@renewfund.com> | 2012-08-08 14:43:53 -0700 |
---|---|---|
committer | Steve Jorgensen <stevej@renewfund.com> | 2012-08-08 14:43:53 -0700 |
commit | 1e17a9d367c54c680368be72f44247ae28b98904 (patch) | |
tree | edf25a8af416839bf9755b7ca69a6cfe7f73ad70 /activerecord | |
parent | c381d5cbf959208adeb38e7859ee815dfbd2cf54 (diff) | |
download | rails-1e17a9d367c54c680368be72f44247ae28b98904.tar.gz rails-1e17a9d367c54c680368be72f44247ae28b98904.tar.bz2 rails-1e17a9d367c54c680368be72f44247ae28b98904.zip |
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.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/connection_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/connection_test.rb b/activerecord/test/cases/adapters/postgresql/connection_test.rb index 47089d5d0d..1ff307c735 100644 --- a/activerecord/test/cases/adapters/postgresql/connection_test.rb +++ b/activerecord/test/cases/adapters/postgresql/connection_test.rb @@ -92,9 +92,9 @@ module ActiveRecord 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 |