Sha256: 7c720830fc703c6c83a29d79b7816781a67e92f87eebceca4c2b5c2e0f1d954b

Contents?: true

Size: 438 Bytes

Versions: 10

Compression:

Stored size: 438 Bytes

Contents

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
require 'fakefs/safe'
require 'test/unit'

class FakeFSSafeTest < Test::Unit::TestCase
  def setup
    FakeFS.deactivate!
  end

  def test_FakeFS_method_does_not_intrude_on_global_namespace
    path = '/path/to/file.txt'

    FakeFS do
      File.open(path, 'w') { |f| f.write "Yatta!" }
      assert File.exists?(path)
    end

    assert ! File.exists?(path)
  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
bmabey-fakefs-0.1.0 test/safe_test.rb
bmabey-fakefs-0.1.1 test/safe_test.rb
madpilot-fakefs-0.1.2 test/safe_test.rb
madpilot-fakefs-0.1.3 test/safe_test.rb
madpilot-fakefs-0.1.4 test/safe_test.rb
madpilot-fakefs-0.1.5 test/safe_test.rb
rsanheim-fakefs-0.0.1 test/safe_test.rb
rsanheim-fakefs-0.0.2 test/safe_test.rb
rsanheim-fakefs-0.1.0 test/safe_test.rb
fakefs-0.1.0 test/safe_test.rb