Sha256: 490a550e76a333309fec31e171170753945186e91cb24104da11c87b279d4c7c
Contents?: true
Size: 694 Bytes
Versions: 3
Compression:
Stored size: 694 Bytes
Contents
# frozen_string_literal: true describe Rake::Funnel::Support::Trace do before do allow($stderr).to receive(:print) end context 'Rake run with --trace' do before do allow(Rake.application.options).to receive(:trace).and_return(true) end it 'should write messages' do described_class.message('foo') expect($stderr).to have_received(:print).with("foo\n") end end context 'Rake run without --trace' do before do allow(Rake.application.options).to receive(:trace).and_return(false) end it 'should not write messages' do described_class.message('foo') expect($stderr).not_to have_received(:print) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rake-funnel-0.24.0 | spec/rake/funnel/support/trace_spec.rb |
rake-funnel-0.23.0 | spec/rake/funnel/support/trace_spec.rb |
rake-funnel-0.22.3 | spec/rake/funnel/support/trace_spec.rb |