diff options
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb index 86cbe530a0..d1d4d545a3 100644 --- a/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb +++ b/activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb @@ -505,35 +505,35 @@ module ActiveRecord end def test_db_is_not_readonly_when_readonly_option_is_false - @conn = Base.sqlite3_connection database: ":memory:", - adapter: "sqlite3", - readonly: false + conn = Base.sqlite3_connection database: ":memory:", + adapter: "sqlite3", + readonly: false - assert_not_predicate(@conn.raw_connection, :readonly?) + assert_not_predicate conn.raw_connection, :readonly? end def test_db_is_not_readonly_when_readonly_option_is_unspecified - @conn = Base.sqlite3_connection database: ":memory:", - adapter: "sqlite3" + conn = Base.sqlite3_connection database: ":memory:", + adapter: "sqlite3" - assert_not_predicate(@conn.raw_connection, :readonly?) + assert_not_predicate conn.raw_connection, :readonly? end def test_db_is_readonly_when_readonly_option_is_true - @conn = Base.sqlite3_connection database: ":memory:", - adapter: "sqlite3", - readonly: true + conn = Base.sqlite3_connection database: ":memory:", + adapter: "sqlite3", + readonly: true - assert_predicate(@conn.raw_connection, :readonly?) + assert_predicate conn.raw_connection, :readonly? end def test_writes_are_not_permitted_to_readonly_databases - @conn = Base.sqlite3_connection database: ":memory:", - adapter: "sqlite3", - readonly: true + conn = Base.sqlite3_connection database: ":memory:", + adapter: "sqlite3", + readonly: true assert_raises(ActiveRecord::StatementInvalid, /SQLite3::ReadOnlyException/) do - @conn.execute("CREATE TABLE test(id integer)") + conn.execute("CREATE TABLE test(id integer)") end end |