Skip to content

Commit

Permalink
Ensure that output dir is created.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdub committed Jan 24, 2012
1 parent 4648e79 commit 00626f0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/pith/project.rb
Expand Up @@ -68,6 +68,7 @@ def build
refresh
load_config
remove_old_outputs
output_dir.mkpath
generate_outputs
output_dir.touch
end
Expand Down
2 changes: 1 addition & 1 deletion lib/pith/version.rb
@@ -1,3 +1,3 @@
module Pith
VERSION = "0.2.1".freeze
VERSION = "0.2.2".freeze
end
14 changes: 13 additions & 1 deletion spec/pith/project_spec.rb
Expand Up @@ -5,7 +5,19 @@

before do
$input_dir.mkpath
@project = Pith::Project.new(:input_dir => $input_dir)
@project = Pith::Project.new(:input_dir => $input_dir, :output_dir => $output_dir)
end

describe "#build" do

before do
@project.build
end

it "creates the output directory" do
$output_dir.should be_directory
end

end

describe "#input" do
Expand Down

0 comments on commit 00626f0

Please sign in to comment.