Skip to content

Commit

Permalink
Use default inspect for database adapter (#1196)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanharan authored Jun 23, 2024
1 parent 88d8e06 commit b6fdbeb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions lib/active_record/connection_adapters/sqlserver_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,6 @@ def version
self.class::VERSION
end

def inspect
"#<#{self.class} version: #{version}, azure: #{sqlserver_azure?.inspect}>"
end

def combine_bind_parameters(from_clause: [], join_clause: [], where_clause: [], having_clause: [], limit: nil, offset: nil)
result = from_clause + join_clause + where_clause + having_clause
result << offset if offset
Expand Down
2 changes: 0 additions & 2 deletions test/cases/adapter_test_sqlserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class AdapterTestSQLServer < ActiveRecord::TestCase
it "has basic and non-sensitive information in the adapters inspect method" do
string = connection.inspect
_(string).must_match %r{ActiveRecord::ConnectionAdapters::SQLServerAdapter}
_(string).must_match %r{version\: \d.\d}
_(string).must_match %r{azure: (true|false)}
_(string).wont_match %r{host}
_(string).wont_match %r{password}
_(string).wont_match %r{username}
Expand Down

0 comments on commit b6fdbeb

Please sign in to comment.