Sha256: 829de504dd041e42b2aa13765c13eabe410f19de69c9b8567068ff5e8fc01e29

Contents?: true

Size: 663 Bytes

Versions: 1

Compression:

Stored size: 663 Bytes

Contents

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

1 entries across 1 versions & 1 rubygems

Version Path
rake-funnel-0.22.2 spec/rake/funnel/support/trace_spec.rb