diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-12-05 09:09:04 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2015-12-05 12:17:07 +0900 |
commit | 4ab20ed563e832a09b22a4c6e87da2e6a3227263 (patch) | |
tree | d7a2cb6f63d0139fb5bec36814a1cad65b775b5d /activerecord/test/cases/adapters | |
parent | 2b6557e70a62158c87f744082f2044524f4f6257 (diff) | |
download | rails-4ab20ed563e832a09b22a4c6e87da2e6a3227263.tar.gz rails-4ab20ed563e832a09b22a4c6e87da2e6a3227263.tar.bz2 rails-4ab20ed563e832a09b22a4c6e87da2e6a3227263.zip |
remove warning from postgresql geometric test
This removes the following warning which has been out in the case of a PostgreSQL 9.3 below.
```
activerecord/test/cases/adapters/postgresql/geometric_test.rb:265: warning: instance variable @connection not initialized
```
Diffstat (limited to 'activerecord/test/cases/adapters')
-rw-r--r-- | activerecord/test/cases/adapters/postgresql/geometric_test.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/test/cases/adapters/postgresql/geometric_test.rb b/activerecord/test/cases/adapters/postgresql/geometric_test.rb index 8d0c5bf23f..3b97cb4ad4 100644 --- a/activerecord/test/cases/adapters/postgresql/geometric_test.rb +++ b/activerecord/test/cases/adapters/postgresql/geometric_test.rb @@ -262,7 +262,9 @@ class PostgreSQLGeometricLineTest < ActiveRecord::PostgreSQLTestCase end teardown do - @connection.drop_table 'postgresql_lines', if_exists: true + if defined?(@connection) + @connection.drop_table 'postgresql_lines', if_exists: true + end end def test_geometric_line_type |