rename @repositories => @paths
This commit is contained in:
parent
6a6c4c1e19
commit
f393202f8e
@ -70,7 +70,7 @@ class Suite
|
||||
def initialize(name)
|
||||
@repository_name = name
|
||||
@path = expand(File.join(Suite.test_tmpdir, name.to_s))
|
||||
@repositories = [@path]
|
||||
@paths = [@path]
|
||||
@commands = []
|
||||
@successful = true
|
||||
end
|
||||
@ -92,8 +92,8 @@ class Suite
|
||||
!@successful
|
||||
end
|
||||
|
||||
def repository(path)
|
||||
@repositories << path
|
||||
def add_path(path)
|
||||
@paths << path
|
||||
end
|
||||
|
||||
def command(cmd, output = nil)
|
||||
@ -103,15 +103,15 @@ class Suite
|
||||
end
|
||||
|
||||
def run!
|
||||
@repositories.each { |r| run(r) }
|
||||
@paths.each { |p| run(p) }
|
||||
end
|
||||
|
||||
def run(r)
|
||||
puts "Integration tests for #{r}"
|
||||
def run(path)
|
||||
puts "Integration tests for #{path}"
|
||||
puts
|
||||
@commands.each do |c|
|
||||
clone(r) do
|
||||
@successful = false unless c.run!(r)
|
||||
clone(path) do
|
||||
@successful = false unless c.run!
|
||||
end
|
||||
end
|
||||
puts
|
||||
@ -170,7 +170,7 @@ class Suite
|
||||
@after = block
|
||||
end
|
||||
|
||||
def run!(repository)
|
||||
def run!
|
||||
puts "$ git media #{@cmd}"
|
||||
actual = Suite.exec @cmd
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
require File.expand_path("../suite", __FILE__)
|
||||
|
||||
Suite.test :empty do |t|
|
||||
t.repository File.join(t.path, ".git")
|
||||
t.repository File.join(t.path, "subdir") # sub directory!
|
||||
t.add_path File.join(t.path, ".git")
|
||||
t.add_path File.join(t.path, "subdir") # sub directory!
|
||||
|
||||
# really simple test
|
||||
t.command "version",
|
||||
|
Loading…
Reference in New Issue
Block a user