Skip to content

Commit 8201212

Browse files
authored
Merge pull request #2279 from yahonda/enable_repeated_description
Enabled `RSpec/RepeatedDescription` cop
2 parents c2d6c7d + 6147da8 commit 8201212

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,5 +301,8 @@ RSpec/EmptyLineAfterSubject:
301301
RSpec/ExcessiveDocstringSpacing:
302302
Enabled: true
303303

304+
RSpec/RepeatedDescription:
305+
Enabled: true
306+
304307
RSpec/RepeatedExample:
305308
Enabled: true

spec/active_record/connection_adapters/oracle_enhanced/dbms_output_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
expect(@logger.output(:debug)).not_to match(/^DBMS_OUTPUT/)
4848
end
4949

50-
it "should log dbms output lines to the rails log" do
50+
it "should log dbms output longer lines to the rails log" do
5151
@conn.enable_dbms_output
5252

5353
expect(@conn.select_all("select more_than_five_characters_long('hi there') is_it_long from dual").to_a).to eq([{ "is_it_long" => 1 }])
@@ -57,7 +57,7 @@
5757
expect(@logger.output(:debug)).to match(/^DBMS_OUTPUT: about to return: 1$/)
5858
end
5959

60-
it "should log dbms output lines to the rails log" do
60+
it "should log dbms output shorter lines to the rails log" do
6161
@conn.enable_dbms_output
6262

6363
expect(@conn.select_all("select more_than_five_characters_long('short') is_it_long from dual").to_a).to eq([{ "is_it_long" => 0 }])

spec/active_record/connection_adapters/oracle_enhanced/schema_statements_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,15 +881,15 @@ class ::TestPost < ActiveRecord::Base; end
881881
expect(TestPost.columns_hash["a" * 128]).not_to be_nil
882882
end
883883

884-
it "should add lob column with non_default tablespace" do
884+
it "should add text type lob column with non_default tablespace" do
885885
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.default_tablespaces[:clob] = DATABASE_NON_DEFAULT_TABLESPACE
886886
schema_define do
887887
add_column :test_posts, :body, :text
888888
end
889889
expect(TestPost.connection.select_value("SELECT tablespace_name FROM user_lobs WHERE table_name='TEST_POSTS' and column_name = 'BODY'")).to eq(DATABASE_NON_DEFAULT_TABLESPACE)
890890
end
891891

892-
it "should add lob column with non_default tablespace" do
892+
it "should add ntext type lob column with non_default tablespace" do
893893
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.default_tablespaces[:nclob] = DATABASE_NON_DEFAULT_TABLESPACE
894894
schema_define do
895895
add_column :test_posts, :body, :ntext

spec/active_record/connection_adapters/oracle_enhanced_adapter_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class ::TestEmployee2 < ActiveRecord::Base
8383
expect(@logger.logged(:debug).last).to match(/select .* from all_constraints/im)
8484
end
8585

86-
it "should get primary key from database at first time" do
86+
it "should get primary key from database at second time without query" do
8787
expect(TestEmployee.connection.pk_and_sequence_for("test_employees")).to eq(["id", "test_employees_seq"])
8888
@logger.clear(:debug)
8989
expect(TestEmployee.connection.pk_and_sequence_for("test_employees")).to eq(["id", "test_employees_seq"])

0 commit comments

Comments
 (0)