Sha256: ff3a0a505a1dd9f09f8bed9d20ce12c6c5dab7e4a9014dddd3ff66be21f2c335

Contents?: true

Size: 960 Bytes

Versions: 6

Compression:

Stored size: 960 Bytes

Contents

$:.unshift File.dirname(__FILE__)
require 'helper'

class UtilTest < Test::Unit::TestCase

  def test_short_spec
    assert_equal "123/123", Bellows::Util.short_spec("123/123/123")
  end

  # test for Utils.test_configs
  def test_test_configs
    sample_config = fixture('config_custom_project.yaml')
    Bellows::Util.stubs(:load_configs).returns(YAML::load(sample_config))

    # ensure configs are set for a project which specifies them
    test_suite_ids, config_template_ids = Bellows::Util.test_configs("glance")

    assert_equal "3", config_template_ids[0]
    assert_equal "4", config_template_ids[1]

    assert_equal "2", test_suite_ids[0]

    # ensure default configs are used for project that doesn't specify them
    test_suite_ids, config_template_ids = Bellows::Util.test_configs("openstack/nova")

    assert_equal "1", config_template_ids[0]
    assert_equal "2", config_template_ids[1]

    assert_equal "1", test_suite_ids[0]

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bellows-2.0.5 test/test_util.rb
bellows-2.0.4 test/test_util.rb
bellows-2.0.3 test/test_util.rb
bellows-2.0.2 test/test_util.rb
bellows-2.0.1 test/test_util.rb
bellows-2.0.0 test/test_util.rb