Sha256: 6d8498f9add6b0f1dac1903e2ace2ac2595b83979c8b8758d9756cfeeeaea792

Contents?: true

Size: 651 Bytes

Versions: 2

Compression:

Stored size: 651 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe 'FromCommand' do
  include_context "tmp dir"
  include_context "output dir"

  let(:command) do
    "mkdir abc && cd abc && echo stuff > abc.txt"
  end

  let(:config_body) do
    "c.command '#{command}', :path => 'abc'"
  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}/**/*.*"].should == ['abc.txt','place.txt'].map { |x| "#{output_dir}/#{x}" }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
overapp-0.4.1 spec/from_command_spec.rb
overapp-0.4.0 spec/from_command_spec.rb