Sha256: 5d7bf57cbeac1e8d571a466429ea8afa587bb4388539dd7008a41b96153ebcf2
Contents?: true
Size: 1.56 KB
Versions: 7
Compression:
Stored size: 1.56 KB
Contents
require 'spec_helper' module RevealCK module Commands describe ServeUI do let :serve_ui do ServeUI.new end let :separator do '------------------------------------------------------------' end let :default_prefix do '[ reveal-ck ]' end let :problem_prefix do '[ problem ]' end describe '#message' do it 'prints the message (preceeded by a prefix) to standard out' do expect(serve_ui).to receive(:puts).with("#{default_prefix} Hello") serve_ui.message('Hello') end end describe '#problem' do it 'prints several messages to standard out' do expect(serve_ui).to receive(:puts).with("#{problem_prefix}") expect(serve_ui) .to receive(:puts) .with("#{problem_prefix} Compilation Problem") expect(serve_ui).to receive(:puts).with("#{problem_prefix}") expect(serve_ui) .to receive(:puts) .with("#{problem_prefix} on line 12") expect(serve_ui).to receive(:puts).with("#{problem_prefix}") serve_ui.problem('Compilation Problem', 'on line 12') end end describe '#blank' do it 'prints a blank line' do expect(serve_ui).to receive(:puts).with '' serve_ui.blank end end describe '#separator' do it 'prints a bunch of dashes' do expect(serve_ui) .to receive(:puts).with separator serve_ui.separator end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems