scm: bazaar: code clean up unit adapter test.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5547 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3597c8b909
commit
f4745d4960
@ -7,7 +7,7 @@ begin
|
|||||||
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/bazaar_repository'
|
REPOSITORY_PATH = RAILS_ROOT.gsub(%r{config\/\.\.}, '') + '/tmp/test/bazaar_repository'
|
||||||
REPOSITORY_PATH.gsub!(/\/+/, '/')
|
REPOSITORY_PATH.gsub!(/\/+/, '/')
|
||||||
|
|
||||||
if File.directory?(REPOSITORY_PATH)
|
if File.directory?(REPOSITORY_PATH)
|
||||||
def setup
|
def setup
|
||||||
@adapter = Redmine::Scm::Adapters::BazaarAdapter.new(REPOSITORY_PATH)
|
@adapter = Redmine::Scm::Adapters::BazaarAdapter.new(REPOSITORY_PATH)
|
||||||
end
|
end
|
||||||
@ -25,7 +25,7 @@ begin
|
|||||||
cat = @adapter.cat('directory/document.txt')
|
cat = @adapter.cat('directory/document.txt')
|
||||||
assert cat =~ /Write the contents of a file as of a given revision to standard output/
|
assert cat =~ /Write the contents of a file as of a given revision to standard output/
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_annotate
|
def test_annotate
|
||||||
annotate = @adapter.annotate('doc-mkdir.txt')
|
annotate = @adapter.annotate('doc-mkdir.txt')
|
||||||
assert_equal 17, annotate.lines.size
|
assert_equal 17, annotate.lines.size
|
||||||
@ -45,10 +45,8 @@ begin
|
|||||||
def test_fake; assert true end
|
def test_fake; assert true end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
class BazaarMochaFake < ActiveSupport::TestCase
|
class BazaarMochaFake < ActiveSupport::TestCase
|
||||||
def test_fake; assert(false, "Requires mocha to run those tests") end
|
def test_fake; assert(false, "Requires mocha to run those tests") end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user