Sha256: 4cf428d7c433c099910236bc73e6c92b350dfcf8cef19b25614598a9e4436df7
Contents?: true
Size: 574 Bytes
Versions: 34
Compression:
Stored size: 574 Bytes
Contents
require 'test/minirunit' RAILS_CONNECTION_ADAPTERS = ['abstract', 'jdbc'] require 'active_record' connspec = ActiveRecord::Base.establish_connection( :adapter => 'jdbc', :driver => 'com.mysql.jdbc.Driver', :url => 'jdbc:mysql://localhost:3306/weblog_development', :username => 'blog', :password => '' ) connection = ActiveRecord::Base.connection results = connection.execute "select * from entries" test_equal results.length, 1 row = results.first test_equal 'First post', row['title'] test_equal 'First post d00d!', row['content'] puts row.inspect
Version data entries
34 entries across 34 versions & 5 rubygems