Improve descriptions for Performance/ActiveRecordSubtransactionMethods
Prior this commit the example description did not show the method name we were testing: RuboCop::Cop::Performance::ActiveRecordSubtransactionMethods when the method uses a subtransaction behaves like a method that uses a subtransaction registers an offense behaves like a method that uses a subtransaction registers an offense behaves like a method that uses a subtransaction registers an offense behaves like a method that uses a subtransaction registers an offense behaves like a method that uses a subtransaction registers an offense behaves like a method that uses a subtransaction registers an offense This commit makes the example description more approachable: RuboCop::Cop::Performance::ActiveRecordSubtransactionMethods when the method uses a subtransaction method: :safe_ensure_unique behaves like a method that uses a subtransaction registers an offense method: :safe_find_or_create_by behaves like a method that uses a subtransaction registers an offense method: :safe_find_or_create_by! behaves like a method that uses a subtransaction registers an offense method: :with_fast_read_statement_timeout behaves like a method that uses a subtransaction registers an offense method: :create_or_find_by behaves like a method that uses a subtransaction registers an offense method: :create_or_find_by! behaves like a method that uses a subtransaction registers an offense Also, use variables in `expect_offense` improving readability.
Showing
Please register or sign in to comment