Sha256: 78e7dce288fdcbbedf0bdacbf0bf3a47407f93fee22e294478635d1654d7ff71

Contents?: true

Size: 605 Bytes

Versions: 2

Compression:

Stored size: 605 Bytes

Contents

# frozen_string_literal: true

::RSpec.configure do |config|
  config.before(:each, mock_refs: ->(v) { !v.nil? }) do |example|
    config.rspeckled_logger.debug("Before Each  - Start - #{__FILE__}")

    reference = if example.metadata[:mock_refs].is_a? ::TrueClass
                  'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
                else
                  example.metadata[:mock_refs]
                end

    allow(::Referehencible).to receive(:reference_number)
                                 .and_return(reference)

    config.rspeckled_logger.debug("Before Each  - End   - #{__FILE__}")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rspeckled-2.1.1 lib/rspeckled/plugins/hooks/referehencible.rb
rspeckled-2.1.0 lib/rspeckled/plugins/hooks/referehencible.rb