Sha256: a47e031e133eef364b86fa527204d18fd8156305d98976a8225478000b2b5c39

Contents?: true

Size: 794 Bytes

Versions: 2

Compression:

Stored size: 794 Bytes

Contents

# encoding: utf-8
require_relative '../test_helper'

module OhlohScm::Adapters
	class BzrMiscTest < OhlohScm::Test

		def test_exist
			save_bzr = nil
			with_bzr_repository('bzr') do |bzr|
				save_bzr = bzr
				assert save_bzr.exist?
			end
			assert !save_bzr.exist?
		end

		def test_ls_tree
			with_bzr_repository('bzr') do |bzr|
				assert_equal ['Cédric.txt',
                'file1.txt',
					      'file3.txt',
					      'file4.txt',
					      'file5.txt'],
					     bzr.ls_tree(bzr.head_token).sort
			end
		end

		def test_export
			with_bzr_repository('bzr') do |bzr|
				OhlohScm::ScratchDir.new do |dir|
					bzr.export(dir)
					assert_equal ['.', '..', 'Cédric.txt', 'file1.txt', 'file3.txt', 'file4.txt', 'file5.txt'], Dir.entries(dir).sort
				end
			end
		end

	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ohloh_scm-2.1.0 test/unit/bzr_misc_test.rb
ohloh_scm-2.0.1 test/unit/bzr_misc_test.rb