Sha256: 37644cab7946b03904619f0c3aab093b2f2d424915340363c8efaf66792d8e2c

Contents?: true

Size: 716 Bytes

Versions: 59

Compression:

Stored size: 716 Bytes

Contents

require "test_helper"

class PlatformTest < Test::Unit::TestCase
  context "file options" do
    should "include add binary bit to options on windows platform" do
      # This constant is not defined on non-windows platforms, so define it here
      File::BINARY = 4096 unless defined?(File::BINARY)

      Vagrant::Util::Platform.stubs(:windows?).returns(true)
      assert_equal Vagrant::Util::Platform.tar_file_options, File::CREAT|File::EXCL|File::WRONLY|File::BINARY
    end

    should "not include binary bit on other platforms" do
      Vagrant::Util::Platform.stubs(:windows?).returns(false)
      assert_equal Vagrant::Util::Platform.tar_file_options, File::CREAT|File::EXCL|File::WRONLY
    end
  end
end

Version data entries

59 entries across 59 versions & 7 rubygems

Version Path
bmhatfield-vagrant-1.0.10 test/unit_legacy/vagrant/util/platform_test.rb
bmhatfield-vagrant-1.0.9 test/unit_legacy/vagrant/util/platform_test.rb
bmhatfield-vagrant-1.0.8 test/unit_legacy/vagrant/util/platform_test.rb
bmhatfield-vagrant-1.0.7 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.7 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.6 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.5 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.4 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.3 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.2 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.1 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-1.0.0 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.99.2 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.99.1 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.7 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.6 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.5 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.4 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.3 test/unit_legacy/vagrant/util/platform_test.rb
vagrantup-0.9.2 test/unit_legacy/vagrant/util/platform_test.rb