Skip to content

Commit

Permalink
add builder runner spec
Browse files Browse the repository at this point in the history
  • Loading branch information
onigra committed Dec 19, 2015
1 parent ad3bf87 commit 16ba815
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions spec/planaria/generator/builder/runner_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
require File.expand_path(File.join('../../../', 'spec_helper'), File.dirname(__FILE__))

RSpec.describe Planaria::Generator::Builder::Runner do
let(:project) { "project" }
before { Planaria::Generator::Initializer::Executer.new(project).run }
after { FileUtils.rm_rf "#{APP_ROOT}/#{project}" }

describe "#run" do
let(:message) do
<<-EOS
Generate #{project}/base.html
EOS
end

it do
expect { described_class.new(project).run }.to output(message).to_stdout
expect(File.exist?("#{APP_ROOT}/#{project}/base.html")).to be_truthy
end
end
end

0 comments on commit 16ba815

Please sign in to comment.