Sha256: b3069f3797d7b095198b31e98e17c564d4612830d710b012ee2b85ca3bcc3c3d
Contents?: true
Size: 1.09 KB
Versions: 7
Compression:
Stored size: 1.09 KB
Contents
require 'helper' describe Mercurial::Node do before do @repository = Mercurial::Repository.open(Fixtures.test_repo) end it "should be considered directory when ends with a slash" do node = @repository.nodes.find('new-directory/subdirectory/', 'a8b39838302f') node.file?.must_equal false node.directory?.must_equal true end it "should be considered file when doesn't end with a slash" do node = @repository.nodes.find('new-directory/something.csv', 'a8b39838302f') node.file?.must_equal true node.directory?.must_equal false end it "should show node contents" do node = @repository.nodes.find('new-directory/something.csv', 'a8b39838302f') node.contents.strip.must_equal 'Here will be CSV.' node = @repository.nodes.find('new-directory/something.csv', '291a498f04e9') node.contents.strip.must_equal 'Here will be some new kind of CSV.' end it "should fetch contents of a node with whitespace in it's name" do node = @repository.nodes.find('File With Whitespace.pdf', '8ddac5f6380e') node.contents.must_equal '' end end
Version data entries
7 entries across 7 versions & 1 rubygems