Commit 4726104b29feb176c1cfc9945464f22c7357f25c

Corrected failing specifications.

git-svn-id: svn+ssh://rubyforge.org/var/svn/piston/trunk@136 d6c2ea82-c31b-0410-8381-e9c44f9824c5

Commit diff

spec/repository_spec.rb

 
1818 it "should report it does not exist when used on a repository which does not exist" do
1919 Piston::Repository.new("file:///path/to/some/repos").should_not exist
2020 end
21
22 it "should report it exists when used on a repository which was created" do
23 @repos = Piston::Repository.new("file://#{File.expand_path(File.dirname(__FILE__))}/tmp/repos")
24 @repos.create!
25 @repos.should exist
26 end
2721end
2822
2923describe Piston::Repository, "with a file:/// URL" do
3024 it_should_behave_like "A local repository"
3125
26 it "should report it exists when used on a repository which was created" do
27 @repos.should exist
28 end
29
3230 it "should create the repository on-disk" do
33 @repos.create!
3431 File.directory?(@repos_dir).should == true
3532 end
3633
3734 it "should raise an exception if the directory already exists" do
38 @repos.create!
3935 lambda { @repos.create! }.should raise_error(Piston::Repository::DirectoryAlreadyExists)
4036 end
41
42 it "should return self from #create!" do
43 @repos.create!.should == @repos
44 end
4537end
4638
4739describe Piston::Repository, "with a newly created local repository" do
4840 it_should_behave_like "A local repository"
4941
50 before do
51 @repos.create!
52 end
53
5442 it "should report the current revision number" do
5543 @repos.youngest.should == 0
5644 end
toggle raw diff