Sha256: 093804dde448d6a5fd5db9425de650fb9d7bc07d264764513dd4ceadd12d6015

Contents?: true

Size: 685 Bytes

Versions: 13

Compression:

Stored size: 685 Bytes

Contents

describe Rake::Funnel::Support::Trace do
  before {
    allow(Rake).to receive(:rake_output_message)
  }

  context 'Rake run with --trace' do
    before {
      allow(Rake.application.options).to receive(:trace).and_return(true)
    }

    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 {
      allow(Rake.application.options).to receive(:trace).and_return(false)
    }

    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

13 entries across 13 versions & 1 rubygems

Version Path
rake-funnel-0.18.0 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.17.0 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.16.1 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.16.0 spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.15.0.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.14.0.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.13.0.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.12.0.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.11.0.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.10.0.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.9.1.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.9.0.pre spec/rake/funnel/support/trace_spec.rb
rake-funnel-0.8.0.pre spec/rake/funnel/support/trace_spec.rb