0
@@ -81,13 +81,13 @@ describe Repository do
0
it "inits the git repository" do
0
- @repository.git_backend.should_receive(:create).with(@repository.full_repository_path).and_return(true)
0
- @repository.create_git_repository
0
+ Repository.git_backend.should_receive(:create).with(@repository.full_repository_path).and_return(true)
0
+ Repository.create_git_repository(@repository.gitdir)
0
it "deletes a repository" do
0
- @repository.git_backend.should_receive(:delete!).with(@repository.full_repository_path).and_return(true)
0
- @repository.delete_git_repository
0
+ Repository.git_backend.should_receive(:delete!).with(@repository.full_repository_path).and_return(true)
0
+ Repository.delete_git_repository(@repository.gitdir)
0
it "knows if has commits" do
0
@@ -130,8 +130,9 @@ describe Repository do
0
}.should change(Task, :count)
0
- task = Task.find(:first, :conditions => ["target_
id = ?", @repository.id], :order => "id desc")
0
+ task = Task.find(:first, :conditions => ["target_
class = 'Repository'"], :order => "id desc")
0
task.command.should == "create_git_repository"
0
+ task.arguments.should match(/#{@repository.gitdir}$/)
0
it "creates a Task on destroy" do
0
@@ -139,7 +140,8 @@ describe Repository do
0
}.should change(Task, :count)
0
- task = Task.find(:first, :conditions => ["target_
id = ?", @repository.id], :order => "id desc")
0
+ task = Task.find(:first, :conditions => ["target_
class = 'Repository'"], :order => "id desc")
0
task.command.should == "delete_git_repository"
0
+ task.arguments.should match(/#{@repository.gitdir}$/)
Comments
No one has commented yet.