Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey committed Apr 9, 2008
2 parents f7c91ad + 6623df8 commit 3d92e0f
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions spec/directory_spec.rb
Expand Up @@ -16,7 +16,7 @@
end

teardown do
FileUtils.rm_r @dir.to_s if FileTest.exist?(@dir.to_s)
#FileUtils.rm_r @dir.to_s if FileTest.exist?(@dir.to_s)
end

it "has valid name" do
Expand All @@ -32,17 +32,14 @@
@sub_dir.delete
end

it "should remove all subdirectories." do
it "removes all subdirectories." do
::FileUtils.should_receive(:rmtree).with(@dir.path)
@dir.delete!
@dir.should_not be_exist
@sub_dir.should_not be_exist
end

it "should an raise error if it tries to delete itself but is not empty." do
it "raises an error if directory tries to delete itself but is not empty." do
lambda {@dir.delete}.should raise_error(PowError)

@dir.should be_exist
@sub_dir.should be_exist
::File.should be_exist(@sub_dir)
end

it "should be able to set the permissions." do
Expand Down

0 comments on commit 3d92e0f

Please sign in to comment.