Sha256: a944d602592539614c1d207afff9f6e868f6c33d246e8091f58b15e4685976f8

Contents?: true

Size: 648 Bytes

Versions: 8

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

require 'logger'

module ExampleGroupMethods
  def uses_logger
    let(:logger) { instance_double(Logger, 'mock') }

    before(:each) do
      allow(Logger).to receive(:new).and_return(logger)
      allow(logger).to receive(:debug).with(instance_of(String))
      allow(logger).to receive(:info).with(instance_of(String))
      allow(logger).to receive(:error) { |p, &m| puts "#{p}: #{m.call}" }
      allow(logger).to receive(:level=).with(Logger::INFO)
      allow(logger).to receive(:formatter=).with(an_instance_of(Proc))
      allow(logger).to receive(:kind_of?).with(Logger).and_return(true)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
service_skeleton-2.2.0 ultravisor/spec/example_group_methods.rb
service_skeleton-2.1.0 ultravisor/spec/example_group_methods.rb
service_skeleton-1.0.5 ultravisor/spec/example_group_methods.rb
service_skeleton-2.0.2 ultravisor/spec/example_group_methods.rb
service_skeleton-2.0.1 ultravisor/spec/example_group_methods.rb
service_skeleton-2.0.0 ultravisor/spec/example_group_methods.rb
service_skeleton-1.0.4 ultravisor/spec/example_group_methods.rb
service_skeleton-0.0.0.1.ENOTAG ultravisor/spec/example_group_methods.rb