Sha256: 13fef958b2902462b0ae2f37914eba2f613918c6f9dbbdde58fd47614a16cf8e

Contents?: true

Size: 578 Bytes

Versions: 8

Compression:

Stored size: 578 Bytes

Contents

require 'rubygems'
require 'require_relative' if RUBY_VERSION < '1.9'
require_relative '../../test_helper.rb'

require_relative File.join('..', '..', '..', 'lib', 'deltacloud', 'core_ext.rb')

class TestArray < MiniTest::Unit::TestCase


  def test_expand_opts!
    assert_equal true, [].respond_to?(:"expand_opts!")
    a = [1,2,3]
    a.expand_opts!(:test => 1)
    assert_equal Hash, a.last.class
  end

  def test_extract_opts!
    assert_equal true, [].respond_to?(:"extract_opts!")
    a = [1,2,3, { :test => 1}]
    a.extract_opts!
    assert_equal [1,2,3], a
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
deltacloud-core-1.1.3 tests/helpers/core_ext/array_test.rb
deltacloud-core-1.1.2 tests/helpers/core_ext/array_test.rb
deltacloud-core-1.1.1 tests/helpers/core_ext/array_test.rb
deltacloud-core-1.1.0 tests/helpers/core_ext/array_test.rb
deltacloud-core-1.0.5 tests/helpers/core_ext/array_test.rb
deltacloud-core-1.0.4 tests/helpers/core_ext/array_test.rb
deltacloud-core-1.0.3 tests/helpers/core_ext/array_test.rb
deltacloud-core-1.0.2 tests/helpers/core_ext/array_test.rb