Sha256: ba735848201ca7b58cf6db9a93d6fa8ab3c1dd99c1069de953509c1e571f4834
Contents?: true
Size: 932 Bytes
Versions: 1
Compression:
Stored size: 932 Bytes
Contents
require 'spec_helper' describe Sprewell do describe '::spin_test' do before(:all) do Dir.chdir 'spec/fixtures/test_project' end after(:each) do FileUtils.rm("sprewell.log") FileUtils.rm_rf(".test_project") end it 'creates a dot directory of the directory the command is run within' do Sprewell.spin_test "echo Hi" File.directory?('.test_project').should be_true end it 'runs the command passed to it' do Kernel.should_receive(:system).with('echo Hi') Sprewell.spin_test "echo Hi" end it 'creates a dot directory for the console output' do Sprewell.spin_test "echo Hi" File.exist?('sprewell.log').should be_true end it 'prints the output of the command to a log file in the current directory' do Sprewell.spin_test "echo Hi" contents = File.read('sprewell.log') contents.should include "Hi" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sprewell-0.0.1 | spec/sprewell_spec.rb |