Ruby 初心者スレッド Part 30
■ このスレッドは過去ログ倉庫に格納されています
0824デフォルトの名無しさん
2009/09/10(木) 17:39:42newgemでbinつき、rspecつきで出力したのが参考になるかも
binのスクリプトのスペックファイルがこんなのになってる
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'tweetswget/cli'
describe Tweetswget::CLI, "execute" do
before(:each) do
@stdout_io = StringIO.new
Tweetswget::CLI.execute(@stdout_io, [])
@stdout_io.rewind
@stdout = @stdout_io.read
end
it "should print default output" do
@stdout.should =~ /To update this executable/
end
end
■ このスレッドは過去ログ倉庫に格納されています