Sha256: b6fad4230f4437bd41d04d0729c55bf0579d3f7ace62097a6f67cf0606fe3aba

Contents?: true

Size: 776 Bytes

Versions: 6

Compression:

Stored size: 776 Bytes

Contents

require 'minitest/autorun'
require 'bisu/config'

class BisuConfigTest < Minitest::Test

  def test_parse
    config = Bisu::Config.parse("test/support/sample_translatable.yml")

    assert_equal config[:type], "BisuOS"
    assert_equal config[:sheet_id], "abc1234567890"
    assert_equal config[:keys_column], "key_name"
    
    assert_equal config[:in], [
      "path/to/file/to/1.ext.translatable",
      "path/to/file/to/2.ext.translatable"
    ]
    
    assert_equal config[:out_path], "path/to/final-%{locale}/%{out_name}"

    assert_equal config[:out], [
      { locale: "en",    kb_language: "english", path: "path/to/default/%{out_name}" },
      { locale: "pt",    kb_language: "portuguese" },
      { locale: "pt-PT", kb_language: "portuguese" }
    ]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bisu-1.2.3 test/test_bisu_config.rb
bisu-1.2.2 test/test_bisu_config.rb
bisu-1.2.1 test/test_bisu_config.rb
bisu-1.2.0 test/test_bisu_config.rb
bisu-1.1.1 test/test_bisu_config.rb
bisu-1.1.0 test/test_bisu_config.rb