diff options
Diffstat (limited to 'spec/rubocop/cop/database')
5 files changed, 5 insertions, 15 deletions
diff --git a/spec/rubocop/cop/database/disable_referential_integrity_spec.rb b/spec/rubocop/cop/database/disable_referential_integrity_spec.rb index 9ac67363cb6..5d31e55e586 100644 --- a/spec/rubocop/cop/database/disable_referential_integrity_spec.rb +++ b/spec/rubocop/cop/database/disable_referential_integrity_spec.rb @@ -1,11 +1,9 @@ # frozen_string_literal: true -require 'fast_spec_helper' +require 'rubocop_spec_helper' require_relative '../../../../rubocop/cop/database/disable_referential_integrity' RSpec.describe RuboCop::Cop::Database::DisableReferentialIntegrity do - subject(:cop) { described_class.new } - it 'does not flag the use of disable_referential_integrity with a send receiver' do expect_offense(<<~SOURCE) foo.disable_referential_integrity diff --git a/spec/rubocop/cop/database/establish_connection_spec.rb b/spec/rubocop/cop/database/establish_connection_spec.rb index 3919872b5e7..987f68def75 100644 --- a/spec/rubocop/cop/database/establish_connection_spec.rb +++ b/spec/rubocop/cop/database/establish_connection_spec.rb @@ -1,11 +1,9 @@ # frozen_string_literal: true -require 'fast_spec_helper' +require 'rubocop_spec_helper' require_relative '../../../../rubocop/cop/database/establish_connection' RSpec.describe RuboCop::Cop::Database::EstablishConnection do - subject(:cop) { described_class.new } - it 'flags the use of ActiveRecord::Base.establish_connection' do expect_offense(<<~CODE) ActiveRecord::Base.establish_connection diff --git a/spec/rubocop/cop/database/multiple_databases_spec.rb b/spec/rubocop/cop/database/multiple_databases_spec.rb index 6ee1e7b13ca..124e8aaf39c 100644 --- a/spec/rubocop/cop/database/multiple_databases_spec.rb +++ b/spec/rubocop/cop/database/multiple_databases_spec.rb @@ -1,11 +1,9 @@ # frozen_string_literal: true -require 'fast_spec_helper' +require 'rubocop_spec_helper' require_relative '../../../../rubocop/cop/database/multiple_databases' RSpec.describe RuboCop::Cop::Database::MultipleDatabases do - subject(:cop) { described_class.new } - it 'flags the use of ActiveRecord::Base.connection' do expect_offense(<<~SOURCE) ActiveRecord::Base.connection.inspect diff --git a/spec/rubocop/cop/database/rescue_query_canceled_spec.rb b/spec/rubocop/cop/database/rescue_query_canceled_spec.rb index 56314a18bf5..2418b45e3bb 100644 --- a/spec/rubocop/cop/database/rescue_query_canceled_spec.rb +++ b/spec/rubocop/cop/database/rescue_query_canceled_spec.rb @@ -1,11 +1,9 @@ # frozen_string_literal: true -require 'fast_spec_helper' +require 'rubocop_spec_helper' require_relative '../../../../rubocop/cop/database/rescue_query_canceled' RSpec.describe RuboCop::Cop::Database::RescueQueryCanceled do - subject(:cop) { described_class.new } - it 'flags the use of ActiveRecord::QueryCanceled' do expect_offense(<<~CODE) begin diff --git a/spec/rubocop/cop/database/rescue_statement_timeout_spec.rb b/spec/rubocop/cop/database/rescue_statement_timeout_spec.rb index b9b2ce1c16b..bfeba2b4d00 100644 --- a/spec/rubocop/cop/database/rescue_statement_timeout_spec.rb +++ b/spec/rubocop/cop/database/rescue_statement_timeout_spec.rb @@ -1,11 +1,9 @@ # frozen_string_literal: true -require 'fast_spec_helper' +require 'rubocop_spec_helper' require_relative '../../../../rubocop/cop/database/rescue_statement_timeout' RSpec.describe RuboCop::Cop::Database::RescueStatementTimeout do - subject(:cop) { described_class.new } - it 'flags the use of ActiveRecord::StatementTimeout' do expect_offense(<<~CODE) begin |