Sha256: 58918f64da7baef5d901e81e7b66db7a30945821fb07d293c68db9da6cef56a9
Contents?: true
Size: 1003 Bytes
Versions: 87
Compression:
Stored size: 1003 Bytes
Contents
require "test_helper" class BoxCollectionTest < Test::Unit::TestCase setup do clean_paths @klass = Vagrant::BoxCollection end should "load all the boxes from the box path" do vagrant_box("foo") vagrant_box("bar") result = @klass.new(vagrant_env) names = result.collect { |b| b.name }.sort assert result.length >= 2 assert names.include?("foo") assert names.include?("bar") end should "reload the box list" do instance = @klass.new(vagrant_env) amount = instance.length vagrant_box("foo") instance.reload! assert_equal (amount + 1), instance.length end should "find a specific box" do vagrant_box("foo") vagrant_box("bar") instance = @klass.new(vagrant_env) result = instance.find("foo") assert result assert_equal "foo", result.name end should "return nil if it couldn't find a specific box" do instance = @klass.new(vagrant_env) assert_nil instance.find("thisshouldnotexist") end end
Version data entries
87 entries across 87 versions & 9 rubygems