Sha256: 2b3982208e890ff387cda9afd2a1ad925a52a631a68bf8dfcc0625267da6d984

Contents?: true

Size: 507 Bytes

Versions: 15

Compression:

Stored size: 507 Bytes

Contents

require "cases/helper"
require 'models/topic'
require 'models/minimalistic'

class StoredProcedureTest < ActiveRecord::TestCase
  fixtures :topics

  # Test that MySQL allows multiple results for stored procedures
  if Mysql.const_defined?(:CLIENT_MULTI_RESULTS)
    def test_multi_results_from_find_by_sql
      topics = Topic.find_by_sql 'CALL topics();'
      assert_equal 1, topics.size
      assert ActiveRecord::Base.connection.active?, "Bad connection use by 'MysqlAdapter.select'"
    end
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
activerecord-2.3.18 test/cases/sp_test_mysql.rb
activerecord-2.3.17 test/cases/sp_test_mysql.rb
activerecord-2.3.16 test/cases/sp_test_mysql.rb
activerecord-2.3.15 test/cases/sp_test_mysql.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/activerecord-2.3.14/test/cases/sp_test_mysql.rb
vanity-1.7.1 vendor/ruby/1.9.1/gems/activerecord-2.3.12/test/cases/sp_test_mysql.rb
activerecord-2.3.14 test/cases/sp_test_mysql.rb
kajam-1.0.3.rc2 vendor/rails/activerecord/test/cases/sp_test_mysql.rb
activerecord-2.3.12 test/cases/sp_test_mysql.rb
radiant-1.0.0.rc2 vendor/rails/activerecord/test/cases/sp_test_mysql.rb
radiant-1.0.0.rc1 vendor/rails/activerecord/test/cases/sp_test_mysql.rb
activerecord-2.3.11 test/cases/sp_test_mysql.rb
activerecord-2.3.10 test/cases/sp_test_mysql.rb
activerecord-2.3.9 test/cases/sp_test_mysql.rb
activerecord-2.3.9.pre test/cases/sp_test_mysql.rb