spec/giternal/repository_spec.rb in honkster-giternal-0.2.1 vs spec/giternal/repository_spec.rb in honkster-giternal-0.2.2
- old
+ new
@@ -53,14 +53,14 @@
File.file?(GiternalHelper.checked_out_path('foo/newfile')).should be_true
File.read(GiternalHelper.checked_out_path('foo/newfile')).strip.
should == 'newfile'
end
- it "should raise an error if the directory exists but there's no .git dir" do
+ it "should clone the .git directory if the directory and .git.frozen.tgz does not exist and there's no .git dir" do
FileUtils.mkdir_p(GiternalHelper.checked_out_path('foo'))
- lambda {
- @repository.update
- }.should raise_error(/Directory 'foo' exists but is not a git repository/)
+ File.exists?(GiternalHelper.checked_out_path('foo/.git')).should be_false
+ @repository.update
+ File.exists?(GiternalHelper.checked_out_path('foo/.git')).should be_true
end
describe "freezify" do
before(:each) do
GiternalHelper.create_repo('external')