Sha256: 2afa6d7e4af350c9535d6aeebcb035ff4333ce4c33c512894eab116341030313

Contents?: true

Size: 694 Bytes

Versions: 9

Compression:

Stored size: 694 Bytes

Contents

describe Rake::Funnel::Support::Trace do
  before do
    allow(Rake).to receive(:rake_output_message)
  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(Rake).to have_received(:rake_output_message).with('foo')
    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(Rake).not_to have_received(:rake_output_message)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rake-funnel-0.22.1 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.22.0 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.21.2 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.21.1 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.21.0 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.20.2 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.20.1 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.20.0 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.19.0 spec/rake/funnel/support/trace_spec.rb