spec/from_command_spec.rb in overapp-0.4.2 vs spec/from_command_spec.rb in overapp-0.5.0

- old
+ new

@@ -25,5 +25,34 @@ it 'runs' do project.write_to! output_dir Dir["#{output_dir}/**/*.*"].sort.should == ['abc.txt','place.txt'].sort.map { |x| "#{output_dir}/#{x}" } end end + +describe 'FromCommand2' do + include_context "tmp dir" + include_context "output dir" + + let(:command) do + "echo stuff > abc.txt" + end + + let(:config_body) do + "c.command '#{command}'" + end + + before do + File.create "#{tmp_dir}/place.txt","fun" + end + + let(:project) do + res = Overapp::Project.new(:path => tmp_dir) + res.stub(:config_body) { config_body } + res + end + + it 'runs' do + project.write_to! output_dir + Dir["#{output_dir}/**/*.*"].sort.should == ['abc.txt','place.txt'].sort.map { |x| "#{output_dir}/#{x}" } + end +end +