Sha256: de1fc9045a25b41ce7dcd720b81307596bdf4ec28f3c6b4d031914236784920a
Contents?: true
Size: 694 Bytes
Versions: 15
Compression:
Stored size: 694 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Actions::PrintNewline do context '#initialize' do it 'has no special requirements' do expect { Actions::PrintNewline.new }.not_to raise_error end it 'accepts a count' do expect { Actions::PrintNewline.new(2) }.not_to raise_error end end context '#run' do it 'prints 1 newline' do result = capture(:stdout) do Actions::PrintNewline.new.run end expect(result).to eq("\n") end it 'prints 2 newlines' do result = capture(:stdout) do Actions::PrintNewline.new(2).run end expect(result).to eq("\n\n") end end end
Version data entries
15 entries across 15 versions & 1 rubygems