Sha256: 8c4e90ab097a5b77cbd2812c9e6b4355c0c83ddf73a3566e147c7b4fd22a17d3

Contents?: true

Size: 1.43 KB

Versions: 12

Compression:

Stored size: 1.43 KB

Contents

require 'example_helper'

module Examples
  module CreateInfobase
    require 'ass_launcher'

    describe 'Create new 1C:Enterprise application aka "information base"' do
      extend AssLauncher::Api

      # Get 1C:Enterprise binary wrapper or fail
      binary = thicks(PLATFORM_VER).last
      fail "Enterprise v #{PLATFORM_VER} not installed" if binary.nil?

      # Build connection string for new infobase.
      # In this case uses file 1C:Enterprise application type but
      # we can create infobase on 1C:Enterprise server. For it we should use
      # Api.cs_srv method which returns server connection string
      conns = cs_file(file: File.join(Dir.tmpdir,'examples.create_infobase.ib'))
      # 1C:Enterprise application Template
      template = Examples::TEMPLATES::CF

      # Build command whith ArgumentsBuilder
      command = binary.command(:createinfobase) do
        connection_string conns
        useTemplate template
        _L 'en'
      end

      # Running and waiting until process executing
      # because it executing in forked process
      process_holder = command.run.wait

      it 'New infobase created whithout errors' do
        # verify execution result
        process_holder.result.verify!
        # 1C:Enterprise application directory really exists
        File.directory?(conns.file).must_equal true
      end

      after do
        FileUtils.rm_rf conns.file if File.exists?(conns.file)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ass_launcher-0.6.0 examples/create_infobase_example.rb
ass_launcher-0.5.0 examples/create_infobase_example.rb
ass_launcher-0.4.1 examples/create_infobase_example.rb
ass_launcher-0.4.0 examples/create_infobase_example.rb
ass_launcher-0.3.4 examples/create_infobase_example.rb
ass_launcher-0.3.3 examples/create_infobase_example.rb
ass_launcher-0.3.2 examples/create_infobase_example.rb
ass_launcher-0.3.1 examples/create_infobase_example.rb
ass_launcher-0.3.0 examples/create_infobase_example.rb
ass_launcher-0.2.2 examples/create_infobase_example.rb
ass_launcher-0.2.1 examples/create_infobase_example.rb
ass_launcher-0.2.0 examples/create_infobase_example.rb