Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 425 Bytes
$LOAD_PATH.unshift File.dirname(__FILE__) + "/../lib"
require 'test/unit'
require 'file_sandbox'
class MyFileTest < Test::Unit::TestCase
include FileSandbox
def test_read
in_sandbox do |sandbox|
sandbox.new :file => 'b/a.txt', :with_contents => 'some stuff'
assert_equal 'some stuff', File.read(sandbox.root + '/b/a.txt')
assert_equal 'some stuff', sandbox['/b/a.txt'].contents
end
end
end