Skip to content

Instantly share code, notes, and snippets.

@koyachi
Created January 31, 2010 12:00
Show Gist options
  • Save koyachi/291035 to your computer and use it in GitHub Desktop.
Save koyachi/291035 to your computer and use it in GitHub Desktop.
[koyachi@sp1200] ~/code/ruby/scissor on refactor-external-command(802ee7e)
! % git diff
diff --git a/spec/command_spec.rb b/spec/command_spec.rb
index c6be291..7e46829 100644
--- a/spec/command_spec.rb
+++ b/spec/command_spec.rb
@@ -26,7 +26,7 @@ describe Scissor::Command do
describe "#_run_command" do
before do
- @ls_err = "ls: xxx: No such file or directory"
+ @ls_err = /ls: xxx(.*?): No such file or directory/
@read_file = lambda {|file|
f = open file
begin
@@ -71,7 +71,7 @@ describe Scissor::Command do
lambda {
command._run_command('ls xxx')
}.should raise_error(Scissor::Command::CommandFailed)
- @read_file.call(file).should include(@ls_err)
+ @read_file.call(file).should match(@ls_err)
Scissor.logger = _logger
Scissor.logger.level = _level
@@ -88,7 +88,7 @@ describe Scissor::Command do
lambda {
command._run_command('ls xxx')
}.should raise_error(Scissor::Command::CommandFailed)
- @read_file.call(file).should_not include(@ls_err)
+ @read_file.call(file).should_not match(@ls_err)
Scissor.logger = _logger
Scissor.logger.level = _level
@@ -106,8 +106,8 @@ describe Scissor::Command do
lambda {
result = command._run_command('ls xxx', true)
}.should_not raise_error(Scissor::Command::CommandFailed)
- @read_file.call(file).should include(@ls_err)
- result.should include(@ls_err)
+ @read_file.call(file).should match(@ls_err)
+ result.should match(@ls_err)
Scissor.logger = _logger
Scissor.logger.level = _level
# 802ee7eはマージしただけ
commit 802ee7e6c12b1a55c8b7d01d23c973a84f41c07b
Author: koyachi <[email protected]>
Date: Sun Jan 31 20:42:35 2010 +0900
Merge branches 'refactor-external-command' and 'refactor-external-command' of git://github.com/youpy/scissor into refactor-external-command
commit ed88626859db46757d7b5ee78268026da15f02bb
Author: youpy <[email protected]>
Date: Sun Jan 31 06:33:22 2010 +0900
fix specs
commit 5982c86da79647fa80422570dfd7077664e17dd4
Author: koyachi <[email protected]>
Date: Sat Jan 9 13:02:54 2010 +0900
delete comments
Scissor::FFmpeg#encode should be encode (i dont know how to test)
./spec/ffmpeg_spec.rb:87
1)
'Scissor::Command#_run_command should log command error when logger.lebel == DEBUG' FAILED
expected "# Logfile created on Sun Jan 31 20:45:34 +0900 2010 by /\nD, [2010-01-31T20:45:34.836768 #5464] DEBUG -- : run_command: which ls\nD, [2010-01-31T20:45:34.839426 #5464] DEBUG -- : \nD, [2010-01-31T20:45:34.840370 #5464] DEBUG -- : run_command: ls xxx\nD, [2010-01-31T20:45:34.844165 #5464] DEBUG -- : ls: xxxにアクセスできません: No such file or directory\n\n" to include "ls: xxx: No such file or directory"
./spec/command_spec.rb:74:
2)
'Scissor::Command#_run_command should return error output as result when force = true' FAILED
expected "# Logfile created on Sun Jan 31 20:45:34 +0900 2010 by /\nD, [2010-01-31T20:45:34.917343 #5464] DEBUG -- : run_command: which ls\nD, [2010-01-31T20:45:34.920622 #5464] DEBUG -- : \nD, [2010-01-31T20:45:34.921964 #5464] DEBUG -- : run_command: ls xxx\nD, [2010-01-31T20:45:34.927948 #5464] DEBUG -- : ls: xxxにアクセスできません: No such file or directory\n\n" to include "ls: xxx: No such file or directory"
./spec/command_spec.rb:109:
[koyachi@sp1200] /home/koyachi
% uname -a
Linux sp1200 2.6.28-17-server #58-Ubuntu SMP Tue Dec 1 19:58:28 UTC 2009 i686 GNU/Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment