$LOAD_PATH << '../lib'
require 'active_record'
require 'html_format'
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
ActiveRecord::Migration.verbose = false
ActiveRecord::Schema.define do
create_table :users do |t|
t.string :name
end
end
class User < ActiveRecord::Base
end
['alice', 'bob', 'carol'].each { |e| User.create!(name: e) }
html_format User # => "
"
html_format User.first # => ""
html_format User.limit(1) # => ""
html_format ActiveRecord::Base.connection.select_all('SELECT * FROM users') # => ""
User.to_html # => ""
User.first.to_html # => ""
User.limit(1).to_html # => ""
ActiveRecord::Base.connection.select_all('SELECT * FROM users').to_html # => ""