Sha256: 57047b49c315da5791b1784decbba79b9a0b6ef4dff9e020576bc8d6cbc11ba4
Contents?: true
Size: 724 Bytes
Versions: 173
Compression:
Stored size: 724 Bytes
Contents
require 'spec_helper' module OutputTest include Softcover::Output extend self def puts_hello puts 'hello' end def print_hello print 'hello' end def printf_hello print 'hello' end def system_cmd system "echo hello" end end describe Softcover::Output do before { Softcover::Output.unsilence! } it 'redirects output' do Softcover::Output.stream = $stderr $stderr.should_receive(:puts).with('hello') $stderr.should_receive(:print).twice.with('hello') OutputTest.puts_hello OutputTest.print_hello OutputTest.printf_hello end it 'redirects system command output' do Softcover::Output.stream.should_receive(:puts) OutputTest.system_cmd end end
Version data entries
173 entries across 173 versions & 2 rubygems