Closed yahonda closed 2 years ago
This pull request enables RSpec/BeNil and RSpec/BeEq cops.
RSpec/BeNil
RSpec/BeEq
Introduced via RuboCop RSpec v2.9.0 https://github.com/rubocop/rubocop-rspec/releases/tag/v2.9.0
$ bundle exec rubocop -a Inspecting 72 files ............................................C......C.C..C........C.C.... Offenses: spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb:47:89: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(ActiveRecord::Base.connection.raw_connection.getImplicitCachingEnabled).to eq(false) ^^ spec/active_record/connection_adapters/oracle_enhanced/connection_spec.rb:55:89: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(ActiveRecord::Base.connection.raw_connection.getImplicitCachingEnabled).to eq(true) ^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:999:25: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf).not_to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1004:31: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf.percent).to be nil # not whatever is in DATA_DEFAULT column ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1017:25: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf).not_to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1021:27: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf.rem).to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1034:25: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf).not_to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1040:34: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf.expression).to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1054:25: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf).not_to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1061:31: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf.percent).to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1074:25: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf).not_to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb:1081:31: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(tf.percent).to be nil ^^^^^^ spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:475:42: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(serialized_column.save!).to eq(true) ^^ spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:480:42: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(serialized_column.save!).to eq(true) ^^ spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:519:45: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(binary_column_object.save!).to eq(true) ^^ spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:627:52: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@conn.table_exists?("TEST_POSTS")).to eq true ^^ spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:628:54: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@conn.table_exists?("NOT_EXISTING")).to eq false ^^ spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb:659:55: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@conn.temporary_table?("TEST_POSTS")).to eq false ^^ spec/active_record/oracle_enhanced/type/boolean_spec.rb:154:59: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee3.test_boolean_before_type_cast).to eq(nil) ^^ spec/active_record/oracle_enhanced/type/boolean_spec.rb:154:59: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(@employee3.test_boolean_before_type_cast).to be(nil) ^^^^^^^ spec/active_record/oracle_enhanced/type/boolean_spec.rb:157:59: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee3.test_boolean_before_type_cast).to eq(nil) ^^ spec/active_record/oracle_enhanced/type/boolean_spec.rb:157:59: C: [Corrected] RSpec/BeNil: Prefer be_nil over be(nil). expect(@employee3.test_boolean_before_type_cast).to be(nil) ^^^^^^^ spec/active_record/oracle_enhanced/type/national_character_text_spec.rb:82:31: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee.save).to eq(true) ^^ spec/active_record/oracle_enhanced/type/national_character_text_spec.rb:93:31: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee.save).to eq(true) ^^ spec/active_record/oracle_enhanced/type/national_character_text_spec.rb:98:31: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee.save).to eq(true) ^^ spec/active_record/oracle_enhanced/type/text_spec.rb:81:31: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee.save).to eq(true) ^^ spec/active_record/oracle_enhanced/type/text_spec.rb:92:31: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee.save).to eq(true) ^^ spec/active_record/oracle_enhanced/type/text_spec.rb:97:31: C: [Corrected] RSpec/BeEq: Prefer be over eq. expect(@employee.save).to eq(true) ^^ 72 files inspected, 28 offenses detected, 28 offenses corrected $
Looks good to me! Thanks!
This pull request enables
RSpec/BeNil
andRSpec/BeEq
cops.Introduced via RuboCop RSpec v2.9.0 https://github.com/rubocop/rubocop-rspec/releases/tag/v2.9.0