Sha256: ae693035c63cac0ddc6a72d4981795f63d7a67521a20593e46368c5520974017

Contents?: true

Size: 1.02 KB

Versions: 29

Compression:

Stored size: 1.02 KB

Contents

module ARTest
  module SQLServer

    extend self

    def root_sqlserver
      File.expand_path File.join(File.dirname(__FILE__), '..', '..')
    end

    def test_root_sqlserver
      File.join root_sqlserver, 'test'
    end

    def root_activerecord
      File.join Gem.loaded_specs['rails'].full_gem_path, 'activerecord'
    end

    def root_activerecord_lib
      File.join root_activerecord, 'lib'
    end

    def root_activerecord_test
      File.join root_activerecord, 'test'
    end

    def test_load_paths
      ['lib', 'test', root_activerecord_lib, root_activerecord_test]
    end

    def add_to_load_paths!
      test_load_paths.each { |p| $LOAD_PATH.unshift(p) unless $LOAD_PATH.include?(p) }
    end

    def migrations_root
      File.join test_root_sqlserver, 'migrations'
    end

    def arconfig_file
      File.join test_root_sqlserver, 'config.yml'
    end

    def arconfig_file_env!
      ENV['ARCONFIG'] = arconfig_file
    end

  end
end

ARTest::SQLServer.add_to_load_paths!
ARTest::SQLServer.arconfig_file_env!

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
activerecord-jdbcsqlserver-adapter-52.0.0 test/support/paths_sqlserver.rb
activerecord-jdbcsqlserver-adapter-51.1.0 test/support/paths_sqlserver.rb
activerecord-jdbcsqlserver-adapter-50.1.0 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.2.1 test/support/paths_sqlserver.rb
activerecord-jdbcsqlserver-adapter-51.0.1 test/support/paths_sqlserver.rb
activerecord-jdbcsqlserver-adapter-51.0.0 test/support/paths_sqlserver.rb
activerecord-jdbcsqlserver-adapter-50.0.0 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.2.0 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.2.0.rc2 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.2.0.rc1 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.1.6 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.0.8 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.1.5 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.1.2 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.1.1 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.1.0 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-4.2.18 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.0.7 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.0.6 test/support/paths_sqlserver.rb
activerecord-sqlserver-adapter-5.0.5 test/support/paths_sqlserver.rb