Sha256: 489e009a91f339d3600fcd15e45242934b5c15d69b9499643f523b19d4bf1b90

Contents?: true

Size: 672 Bytes

Versions: 41

Compression:

Stored size: 672 Bytes

Contents

module ActiveRecord
  class Base
    class << self
      def test_connection(config)
        @connect ||= Connection.new
      end
    end
  end
  
  class Connection
    attr_accessor :throw
    attr_reader :disconnected
    
    def initialize
      @disconnected = false
      @throw = false
    end
    
    def disconnect!()
      @disconnected = true
    end
    
    def find()
      # used to test that we've instrumented this...
    end

    def select_rows(s)
      execute(s)
    end
    def execute(s)
      fail "" if @throw
      if s != "EXPLAIN #{::SQL_STATEMENT}"
        fail "Unexpected sql statement #{s}"        
      end
      s
    end
  end
end


Version data entries

41 entries across 41 versions & 4 rubygems

Version Path
onyx_newrelic_rpm-2.12.5 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.12.3 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.12.2 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.12.2.beta2 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.12.2.beta test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.12.1 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.12.1.alpha test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.12.0 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.11.3 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.11.2 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.11.2.beta2 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.11.2.beta test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.11.1 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.11.0.beta2 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.11.0.beta test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.10.8 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.10.6 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.10.5 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.10.4 test/new_relic/agent/mock_ar_connection.rb
newrelic_rpm-2.10.3 test/new_relic/agent/mock_ar_connection.rb