From f2d5bcd439c38d3c839eec8e66d4f74a32c643df Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 25 Jul 2017 11:37:25 -0400 Subject: [PATCH] Stop writing to STDOUT/ERR during tests --- spec/components/column_dropper_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/components/column_dropper_spec.rb b/spec/components/column_dropper_spec.rb index a0076f2932c..b936b8409e2 100644 --- a/spec/components/column_dropper_spec.rb +++ b/spec/components/column_dropper_spec.rb @@ -60,7 +60,7 @@ RSpec.describe ColumnDropper do VALUES (1, 'something@email.com'); SQL - described_class.mark_readonly(table_name, 'email') + ColumnDropper.mark_readonly(table_name, 'email') end after do @@ -74,7 +74,7 @@ RSpec.describe ColumnDropper do it 'should prevent updates to the readonly column' do expect do - ActiveRecord::Base.exec_sql <<~SQL + ActiveRecord::Base.connection.raw_connection.exec <<~SQL UPDATE #{table_name} SET email = 'testing@email.com' WHERE topic_id = 1; @@ -99,7 +99,7 @@ RSpec.describe ColumnDropper do it 'should prevent insertions to the readonly column' do expect do - ActiveRecord::Base.exec_sql <<~SQL + ActiveRecord::Base.connection.raw_connection.exec <<~SQL INSERT INTO #{table_name} (topic_id, email) VALUES (2, 'something@email.com'); SQL